Dec 21, 2015 05:49 AM|Candice Zhou|LINK
Hi Syed Khaleel,
Welcome to ASP.NET Forums!
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.
Firstly, you should make sure the following preconditions are true:
1. You aren't using a web farm.
2. It appears when using built-in databound controls such as GridView, DetailsView or FormView which utilize “DataKeyNames”.
3. It appears if you have a large page which loads slowly for any reason.
Secondly, you could fix the error through following ways:
1. Set enableEventValidation to false and viewStateEncryptionMode to Never as follows:
<pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode ="Never" />
2. Mark the form as disabled and then enable it in script once the load is complete, or you can disable the individual form elements and enable them once everything is loaded.
3. Override the Render Event of the page to place the hidden fields for Encrypted Viewstate and Event validation on the top of the form.
For more information,please refer to the document about
Validation of viewstate MAC failed error.