Sep 30, 2008

Error: Validation of viewstate MAC failed

This is common error generally working with UpdatePanel.

On your screen you see message "Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster."

You can fix it in two ways, setting in web.config or in page it self.

In web.config:

<pages enableEventValidation="false" viewStateEncryptionMode ="Never" />

Or in page you write following line in @Page directive.

<%@ Page EnableEventValidation="false" ViewStateEncryptionMode="never" ...


Saravanan said...

i am still having the problem can you please assist with some solution

Saravanan said...

please update the solution or any other alternative solution , because this is not working for me.