ASP.Net Error: Validation of viewstate MAC failed

Last Reply 11 months ago By chetan

Posted 11 months ago

i an 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."

I am getting login.after few minutes,when i click on logout,it throws the above error..How to pvercome with this?

Posted 11 months ago

Hi chetan,

Please take reference the below link.

ASP.Net Error: Validation of viewstate MAC failed.

Posted 11 months ago

1.I used the <machineKey> Generator Tool to generate a machine key.

The above link not working to generate machine key.

Posted 11 months ago

This helped me to overcome with that issue:


1.Open IIS------>MachineKey----->Generate keys
2.Include the generated validation key and decryption key into the web.config.