Why am I am getting the following ViewState error: "The View State is invalid for this page and might be corrupted"?

We have the machine key set the same on all webfarm nodes to ensure viewstate is handled properly regardless of which node handles ASP.NET requests.  Possible reasons for ViewState errors are:

  • The site was changed while testing.  If this happens, reload the first page and start again.
  • Server.Transfer is being used in code.  If this is the case consider setting EnableViewStateMac = "False".  Note that there are security considerations to disabling ViewStateMac so use this with caution. 
     

Article ID: 248, Created On: 8/7/2009, Modified: 5/25/2012