开发者

Servermove "System.Web.HttpException: Unable to validate data"

Since a server-move I'm getting the error "System.Web.HttpException: Unable to validate data" on some of my client computers. The stacktrace is pasted below.

I know this probably happens when the page is presente开发者_JAVA技巧d to the user, but not yet fully loaded (the viewstate) and the user clicks a control too early. But is there a way to fix it without telling the users to take it easy? Also: there are not problems on another computer, which is located in another domain (probably closer to, or the same as, the servers domain). It also worked flawlessly before the server got moved.

Any thoughts/ideas that might help?

Stacktrace:

[HttpException (0x80004005): Unable to validate data.] 
  System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +195 
  System.Web.UI.LosFormatter.Deserialize(String input) +60 

[HttpException (0x80004005): Authentication of viewstate failed.  1) If this is a cluster, edit <machineKey> configuration so all servers use the same validationKey and validation algorithm.  AutoGenerate cannot be used in a cluster.  2) Viewstate can only be posted back to the same page.  3) The viewstate for this page might be corrupted.] 
  System.Web.UI.LosFormatter.Deserialize(String input) +118 
  System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +102 

[HttpException (0x80004005): Invalid_Viewstate 
       Client IP: 10.33.202.162 
       Port: 2080 
       User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) 
       ViewState: dDwyMDE4ODE0MjgxO3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDM+Oz47bDx0PHQ8O3A8bDxpPDA+O2k8MT47aTwyPjtpPDM+O2k8ND47aTw1PjtpPDY+O2k8Nz47aTw4PjtpPDk+O2k8MTA+O2k8MTE+O2k8MTI+O2k8MTM+O2k8MTQ+O2k8MTU+O2k8MTY+O2k8MTc+O2k8MTg+O2k8MTk+O2k8MjA+O2k8MjE+O2k8MjI+O2k8MjM+O2k8MjQ+O2k8MjU+Oz47bDxwPFVXVi0wNDAwO3V3djA0MDA+O3A8VVdWLTAzMDE7dXd2MDMwMT47cDxVV1YtMDMwMDt1d3YwMzAwPjtwPFVXVi0wMjAyO3V3djAyMDI+O3A8R1ZJIFdlYnNlcnZpY2U7Z3Zpd3M+O3A8UG9saXNQbHVzO3BvbGlzcGx1cz47cDxQb2xpcztwb2xpcz47cDxPRFNGMDAxO29kcz47cDxPRFNGMDAyO29kc0YwMDI+O3A8T0RTRjAwMztvZHNGMDAzPjtwPFVEUFM7VURQUz47cDxVREEwMTAwO1VEQTAxMDA+O3A8VURBMDEwMTtVREEwMTAxPjtwPFVEQTAxMDI7VURBMDEwMj47cDxBVkIwMTtBVkIwMT47cDxBVkIwMjtBVkIwMj47cDxBVkIwMztBVkIwMz47cDxQVkM7cHZjPjtwPEdhayBJbmtpams7MT47cDxVU1pPIElua2lqazs0PjtwPEhHTyBCb3V3OzEwNT47cDxIR08gQlZHOzEwMT47cDxIR08gRGV0YW07MTAyPjtwPEhHTyBHVU87MTAzPjtwPEhHTyBVU1pPOzEwND47cDxIR08gQk9VVyBBRzsxMDY+Oz4+Oz47Oz47Pj47Pj47bDxSZXNwb25zZU9wbWFrZW5DaGVja2JveDs+PjzKtZ2M0RXRnZgX5z4o208+vljZ 
       Http-Referer: http://be04uap535uwv38.productie.hrc.ba.uwv.nl/soap/suwiml/beheer/KBS012KBS013Vraag.aspx 
       Path: /soap/suwiml/beheer/KBS012KBS013Vraag.aspx.] 
  System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +443 
  System.Web.UI.Page.LoadPageViewState() +18 
  System.Web.UI.Page.ProcessRequestMain() +447


I have usually seen these types of errors when there is some kind of load balancing going on. Is the old server still online? Is there a load balancer that may be sending responses down to the user from the old server, and then the next request goes tot he new server? There could be some DNS caching happening too, where traffic is still going to the older server in some cases.

Some other questions: Is the old server offline? Could people have old sessions open (with the old viewstate keys) and those are getting posted back to the new server?

Worst case, if you cannot figure out why this is happening, you can set the machine key (in the machine.config) on the new machine to be the same as the old machine. Its not usually a good practice, but this makes it so the viewstate can be encrypted and decrypted on either machine.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜