Recently I have been facing this problem of invalid viewstate. After googling a bit found some interesting concepts and solutions related to viewstate. So I thought let me just make a note of these references and have them handy.
This is from the Microsoft Support highlihgting some techniques that you can use to debug / troubleshoot this problem -
http://support.microsoft.com/?id=829743
This one is more interesting which highlights how you can get this problem while using Server.Transfer method, again from Microsoft Support -
http://support.microsoft.com/kb/316920/
This one here is related to machineKey set to auto generate in machine.config
http://forums.asp.net/p/1059371/1516632.aspx
This one here is related to third party web site (running on different framework version) posting into your web site.
http://blogs.msdn.com/tess/archive/2007/06/11/a-case-of-invalid-viewstate.aspx
Hope all your invalid viewstate problems get taken care of with this.
Here is the exception detail -
ExceptionSystem.Web.UI.ViewStateException: Invalid viewstate. Client IP: x.x.x.x Port: xxxx User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.04506) ViewState: /wE xxxxxxxxxxxxxxxxxxxx
Referer: https://xxxxxx/
Path: /xxx.aspx
Stack Traceat System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) at System.Web.UI.ClientScriptManager.EnsureEventValidationFieldLoaded() at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) at System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) at System.Web.UI.WebControls.TextBox.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.WebControls.TextBox.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
And finally everything one needs to know about ViewState is here -
http://msdn.microsoft.com/en-us/library/ms972976.aspx
This is from the Microsoft Support highlihgting some techniques that you can use to debug / troubleshoot this problem -
http://support.microsoft.com/?id=829743
This one is more interesting which highlights how you can get this problem while using Server.Transfer method, again from Microsoft Support -
http://support.microsoft.com/kb/316920/
This one here is related to machineKey set to auto generate in machine.config
http://forums.asp.net/p/1059371/1516632.aspx
This one here is related to third party web site (running on different framework version) posting into your web site.
http://blogs.msdn.com/tess/archive/2007/06/11/a-case-of-invalid-viewstate.aspx
Hope all your invalid viewstate problems get taken care of with this.
Here is the exception detail -
ExceptionSystem.Web.UI.ViewStateException: Invalid viewstate. Client IP: x.x.x.x Port: xxxx User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.04506) ViewState: /wE xxxxxxxxxxxxxxxxxxxx
Referer: https://xxxxxx/
Path: /xxx.aspx
Stack Traceat System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) at System.Web.UI.ClientScriptManager.EnsureEventValidationFieldLoaded() at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) at System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) at System.Web.UI.WebControls.TextBox.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.WebControls.TextBox.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
And finally everything one needs to know about ViewState is here -
http://msdn.microsoft.com/en-us/library/ms972976.aspx
Comments