Knowledge Base

Troubleshooting: "Validation of viewstate MAC failed" Error

This article is for 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."


There are many reasons for this error. For example, it could be that your session was lost in the middle of an action on a form or that your application pool refreshed in the middle of a form submittion thus you form is submitting to a newly refreshed application pool. 


There are a few solutions for this that you can deploy:

1) You can try setting a machinekey element on your site. One customer has described this solution here:


You can make your own machine key at the following URL: http://aspnetresources.com/tools/machineKey

2) If you are using a session in the section of your site that receives this error, try using ASP.NET Session State Server so that the session is not tied with your application pool:


3) The issue is discussed in a few places on our customer forums. Please visit http://forum.arvixe.com/smf/search2/ and do a search to find more.

Did you find this article helpful?

* Your feedback is too short