Thursday, January 10, 2013

SharePoint "Validation of viewstate MAC failed"

I had a button on a SharePoint page and was posting back to the page with the ID of the item I was using, so my page was:  /Pages/Order.aspx?ID=5 and I kept getting the following error:

"Validation of viewstate MAC failed"

After toying around a bit I realized that the ID parameter is a reserved querystring parameter and can't be used, so just changing the name of the parameter fixed the issue.