Failed to check MAC address viewstate

I am currently getting this error:

Failed to check the MAC address of the viewstate. If this application is hosted by a web farm or cluster, make sure the configuration <machineKey>

specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

I have found several solutions to this error. The solution we are currently using is to add a static MachineKey field at the machine level and use static validation keys and decryption keys.

<MachineKey validationKey="" decryptionKey="" validation="SHA1" decruption="AES" />

      

Will this solution work for .NET 3.5? Is there a more elegant solution?

+1


source to share


1 answer


Is your web application hosted by webfarm?

If so, the reason for this is that the page is being rendered by Server 1 and posted to Server 2. Therefore, the machine keys are different and the validation has failed.



It will also work on ASP.NET 3.5.

+2


source







All Articles