web analytics

Validation of viewstate MAC failed in ASP.NET


codeling 1560 - 6504
@2021-05-09 15:50:58

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.

@2021-05-09 15:58:34

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.


You must Sign In to comment on this topic.

© 2022 Digcode.com