开发者

System.Web.UI.ViewStateException : Invalid viewstate

I'm getting weird errors ever since my hosting company decided to upgrade (and restart) my web server.

Here are the facts, broken down

  • MVC 2 Application
  • Windows 2008 Server
  • Machine Key defined in the webconfig (and in machine config- same exact key)
  • Machine key was defined in the web.config for the site before the maintenance
  • Site uses its own app pool running as Network Service
  • I am not using viewstate, but I am using the anti forgery token

Despite doing everything stated, I am still getting numerous errors like this:

System.Web.UI.ViewStateException : Invalid viewstate. Client IP: [OMITTED] Port: 56668 Referer: https://someserver.com Path: /Framed/CreditCard/ User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Wind开发者_JS百科ows NT 6.0; WOW64; Trident/4.0; GTB7.1; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30618) ViewState: [OMITTED]

I was able to recreate the error once, but after that it stopped. I thought I had fixed it, but my clients still get the error.

EDIT: I thought originally this had been because of the worker process recycling. This is not the case, as I have made pushes to the web server with changes that have cause the WP to recycle. I do however believe it was something in the updates they may have done last night. Waiting to hear back on a report of what they did.


Well, I read an article before, may be it's the same problem you have

http://keylimetie.com/blog/2006/9/24/viewstate/


We moved to a new hosting environment, and I still periodically see this error. I ended up removing the Antiforgery token from most of my site, and in all new development I do not make use of it. For some reason it just fails to operate as it should.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜