Avoiding "Validation of viewstate MAC failed"

31 Jan 2011

This is usually down to servers hosting multiple websites/shared hosting, or I tend to get it when developing and keep on compiling. To stop this then simply add a machine key to the config so it’s always the same, to do this easily use this generator:

http://aspnetresources.com/tools/machineKey

Simply press the button and copy the machinekey element in your web.config within system.web.

asp.net  
Posted by makit
Last revised 15 May 2012 03:26 PM

makit / Martyn Kilbryde

Professional software developer, ponderer and eccentric.

flickr

Github

LinkedIn

Stack Overflow

Twitter