Validation of viewstate MAC failed - MVC

Posted by Nettuce on Geeks with Blogs See other posts from Geeks with Blogs or by Nettuce
Published on Sun, 14 Mar 2010 13:12:51 GMT Indexed on 2010/03/14 14:25 UTC
Read the original article Hit count: 220

Filed under:

This gave me a WTF moment recently. MVC? Viewstate? Eh!? All was fine on the dev server, but as soon as I deployed to the web farm this error appeared every time I recycled the app pool. It turns out it was the cookie created by <%= Html.AntiForgeryToken() %> and simply generating a machine key sorted it out.

http://aspnetresources.com/tools/keycreator.aspx

© Geeks with Blogs or respective owner