Search This Blog

Thursday, April 25, 2013

MAC Error in asp.net "Validation of viewstate MAC failed"


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. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Web.HttpException: 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.

Source Error:

try to add this string in <system.web> section of your web.config file :

<pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode ="Never" />
for fix "Validation of viewstate MAC failed" error.

1 comment :

Anonymous said...

Hi Chandra Prakash ,

Thanks for sharing this information in detail.





Dotnetnuke cms