Question

I built a website with some ASPX-C# pages, I added a new page with a form. The problem is that when I click submit I get the following error:

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.

The forms in all the other pages work fine, but after the submit in this specific page - the forms don't work and I get this error for all the forms. I tried to search for a solution online, but it seems that the solutions I found didn't work. :(

Update I put this code in the web config page AND the problem solved :

<pages enableViewStateMac="false" />

But the PostBack command is not working well now.

My question is WHY and how can I fix it?

Please help me I have to solve this as quick as possible.

Was it helpful?

Solution

For starters add this on you web.config and check if its working:

<machineKey decryptionKey="A4B12CCDD50E95F8GB9GFH6JKAT4Y0U0I2OF2DF2AAFE5AB46189C,IsolateApps" 
            validation="AES" 
            validationKey="480CDF2AS9S9AS5CFDGF0GHFH9JJH4KHKAKLJ2L9F3SAS82A6C16911A29EF48903783F94529C21570AACB72766FB38CD4CE7B85B0ACE3149DC5FC1CCF1AA1CECE3579659996593B06,IsolateApps"/>

Check this for more details

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top