Paul
Paul

Reputation: 29

Website always occur the following error Failed to load viewstate

Recently, I don't why our website always occur the following error,but before I never receive the same errors. The request IP is 91.201.66.76 , I don't know my hosting meet attack.

Error Message: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

Request URL: http://www.hicalc.com/SignUp.aspx

Request IP: 91.201.66.76    Language:     Logined User: Anonymous

Beijing Time: 3/17/2011 2:57:41 PM ( UTC+8 )     Web Server Local Time: 3/17/2011 12:57:41 AM

HttpUnhandledException: "Exception of type 'System.Web.HttpUnhandledException' was thrown."
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.signup_aspx.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

HttpException: "Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request."
   at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
   at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
   at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
   at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
   at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
   at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
   at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
   at System.Web.UI.Page.LoadAllState()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Upvotes: 1

Views: 385

Answers (1)

Andrew Savinykh
Andrew Savinykh

Reputation: 26348

Your post does not have a question in it. I'm assuming, that you asking, "Why this error is happening?" The answer is that in order to load ViewState the control tree should match exactly the control tree before post back. And yours are not matching up.

If you can give some more info as to what kind of code you are using for generating your control tree on the page, we can pin point more closely why the generated trees do not match.

Upvotes: 1

Related Questions