Go through the ‘Add STS Reference’ process.
1. Service Certificate Location
Make sure you remove the defaults that the ASP.NET MVC 3 project put into your web.config on the <certificateReference> element. StoreLocation and StoreName must be removed. Otherwise you get the following error.
Your <serviceCertificate> element (full path is “/microsoft.identityModel/service”) should be changed from this:
<serviceCertificate> <certificateReference x509FindType="FindByThumbprint" findValue="*****THUMBPRINT*****" storeLocation="LocalMachine" storeName="My" /> </serviceCertificate>
…to this:
<serviceCertificate> <certificateReference x509FindType="FindByThumbprint" findValue="*****THUMBPRINT*****"/> </serviceCertificate>
2. Validate Request
Make sure that you add an <httpRuntime> element and set the request validation mode with a value of “2.0”.