最近,我不知道为什么我们的网站总是出现以下错误,但在此之前我从未收到过相同的错误。
请求IP为91.201.66.76
,我不知道我的主机遭遇攻击。
错误消息:无法加载viewstate。正在加载视图状态的控制树必须与在上一个请求期间用于保存视图状态的控制树匹配。例如,在动态添加控件时,回发期间添加的控件必须与初始请求期间添加的控件的类型和位置相匹配。
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)
答案 0 :(得分:1)
您的帖子中没有问题。我假设,你问,“为什么会发生这种错误?”答案是,为了加载ViewState,控制树应该在回发之前与控制树完全匹配。而你的不匹配。
如果您可以提供有关在页面上生成控制树所使用的代码类型的更多信息,我们可以更准确地指出生成的树不匹配的原因。