简体   繁体   中英

Invalid Viewstate

I always got this error guys on my site.Anybody got a solution.


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'



I noticed that there are strings that got appended on the last part of ScriptResource.axd which are not part of the querystring(equestManager._initialize('ctl00%24ScriptManager1').I don't know how this string ends up here.I am using MS ajax, webforms and IIS7 on a shared hosting plan.

This is a bug caused by IE8 users, you can read about it here: http://blogs.msdn.com/ieinternals/archive/2009/07/27/Bugs-in-the-IE8-Lookahead-Downloader.aspx

The basics are that when IE8 processes the page, it sometimes just leaves 4kb out of it, and if your <script src="ScriptResource.axd?.... started and gets truncated, when the page is rejoined with 4k missing, up until the matching quote to close the src="" is used, resulting in a very strange request to your server.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM