I have an ASP.NET web application that is set up to host on IIS Express in Visual Studio, now I am trying to change its host to the local IIS server. When I run this application in Visual Studio I am getting the following error :
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
In my situation, the web application has the following configuration:
<httpCookies requireSSL="true" />
Also, the forms authentication is configured as reureSSL="true".
I noticed that when I change the host to local IIS, the HTTP instead of HTTPS is used in the url. After I change the protocol to https, then I can run the application in Visual Studio.
© 2021 Digcode.com