A very popular error, so popular and in so many places still unresolved. I spent a while trying to track down what was causing this error on my new hosting environment. I felt it would be a great idea to go ahead and repost my successful solution. I first did a hefty bit of searching on Google of course. Going through dozens of blogs and forums that seemed to all have similar answers for how to solve it. Turn off event validation they would say! Everything I read on that was telling me it would be a security nightmare to have a public application with page validateRequest=”false” enableEventValidation=”false” viewStateEncryptionMode=”never” in your web config file. I tried it anyway and I still got “Validation of viewstate MAC failed.” and I was so frustrated!
I kept searching until I found http://www.developmentnow.com/articles/machinekey_generator.aspx that generated a machine key and the xml required for my web config file. I put that in there an set the page attribute enableViewStateMac to true and uploaded my changes. I waited, 5 minutes no error, 5 hours no error, 24 hours no error. I exclaimed with joy when I could refresh my page after being idle a while and not see that terrible error. I hope this helps out someone else as I spent way to long tracking down an answer to this problem.