I've checked every post on SO, every post on the internet, but nothing is helping.
I'm getting the Validation of viewstate MAC failed error. It just started failing on our production server all of a sudden. However it works on our staging server, and the files are identical. We discovered that our production server has SP2, while the staging server has SP1.
We're not on a webfarm. I've added this machine key to the web.config:
<machineKey validationKey="AutoGenerate,IsolateApps"
decryptionKey="AutoGenerate,IsolateApps"
validation="SHA1"/>
I've also tried all of the workarounds here: http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx.
One other thing I should mention; this isn't happening after a postback. It's happening after a redirect. It seems like most of the cases I've seen on the internet happen after a postback. Not sure if this has anything to do with the error.
Anyway, does anyone have any ideas?
Best Answer
I had a similar problem recently. Here is what I did:
form
elements don't have anaction
attribute defined.machineKey
for the application instead of usingAutoGenerate
. You can use this tool to do this easily.Good luck!