无效的Viewstate

时间:2010-04-03 15:59:12

标签: asp.net viewstate webforms

我总是在我的网站上遇到这个错误。任何人都有解决方案。


Stacktrace
at System.Web.UI.Page.DecryptStringWithIV(String s, IVType ivType) at System.Web.UI.Page.DecryptString(String s) at System.Web.Handlers.ScriptResourceHandler.DecryptParameter(NameValueCollection queryString) at System.Web.Handlers.ScriptResourceHandler.ProcessRequestInternal(HttpResponse response, NameValueCollection queryString, VirtualFileReader fileReader) at System.Web.Handlers.ScriptResourceHandler.ProcessRequest(HttpContext context) at System.Web.Handlers.ScriptResourceHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Query String
d=J_c3w3Q59U-PnoRlWBPOJMVgHe_9Ile9wANEXiRFLzG8mequestManager._initialize('ctl00%24ScriptManager1'



我注意到在ScriptResource.axd的最后一部分附加了一些字符串,这些字符串不是查询字符串的一部分(equestManager._initialize('ctl00%24ScriptManager1')。我不知道这个字符串是如何结束的。我在共享主机方案中使用MS ajax,webforms和IIS7。

1 个答案:

答案 0 :(得分:0)

这是IE8用户造成的错误,您可以在此处阅读:http://blogs.msdn.com/ieinternals/archive/2009/07/27/Bugs-in-the-IE8-Lookahead-Downloader.aspx

基本原理是,当IE8处理页面时,它有时只留下4kb,如果你的<script src="ScriptResource.axd?....启动并被截断,当页面重新加入时缺少4k,直到匹配的引用为止关闭使用src="",导致向您的服务器发出非常奇怪的请求。

更新: It's been fixed now with KB980182(4/1/2010)