简体   繁体   中英

Validation of viewstate MAC failed

i have these message in only one user of my web ASP.NET application.

Validation of viewstate MAC failed. If this application is hosted by a Web Farm 
or cluster, ensure that <machineKey> configuration specifies the same validationKey & 
validation algorithm. AutoGenerate cannot be used in a cluster.

Any idea how to fix these?

Have you tried specifying a machine key? Even if you're not in a web farm, when the app pool recycles, a new machine key is generated and may be causing your issue.

Here's some information. However, you might want to try installing the .NET 3.5 SP1 before trying anything else, and see if that resolves the issue:

http://blogs.msdn.com/b/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx

I also had a single user that was reporting this error message when using my web forms. After some research, I found a suggestion to split the viewstate across multiple hidden fields by using the maxPageStateFieldLength parameter in my web.config. That worked like a charm for my user. Granted, I should still take a look and see why my viewstate is so large, but at least it got him up and running. You can check out the article here:

http://www.andreas-kraus.net/blog/validation-of-viewstate-mac-failed/

it happened to me when I surfed to my web application via ip address. in my case, changing the ip address to localhost fixed it

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM