Last post Apr 05, 2011 02:45 PM by Naved Hasan Khan
Mar 30, 2011 05:10 PM|jgsketch|LINK
Hi Guys. I have a unique issue that I have not been able to resolve by looking at other Viewstate verification errors online.
Background: A client comes into our site, signs in and proceeds to an e-sign form. Once they click the submit button, they get the viewstate error. Sometimes they get through and get the error on either of the next two forms. This happens
sporadically. Maybe 2 out of 10 receive the error. All clients who received an error were able to go back in a few hours later and complete the forms without error. My hosting company, programmers and myself have not been able to replicate the error yet.
This has been happening for the last 2 weeks.
So we have three pages that this is occurring on one domain and another separate page on a different domain. All on the same windows dedicated server. So first thought is that, I have not changed any code in months, my SQL admin has not
changed code related to these processes in several months, so it must be the server. I submitted a ticket with Liquidweb. They could not find anything wrong.
Funny thing is, I do not use viewstates in my web.config or on my forms. I did try using the disable viewstate code in the config file. I also checked the viewstate base64 code in a decrypter, that looked fine. I checked the sessions are
enabled and enough time is set for timeouts. No patterns have occurred, like specific times, browsers, or locations.
I’m currently having the programmers that we work with go through the code and server settings.
Conclusions: It seems like the cookie or session data is being lost somewhere along the process. I checked the ideal timeout settings and they are at 20min. More than enough time for someone to e-sign, (our reps walk the client through
the entire process, so I’m sure on the timeframe.) I still think it’s a hosting issue, but they say nothing has changed in two weeks.
It’s starting to come down to finger pointing now between the hosting techs, sql admin, it admin and programmers. Grrrr.
Here is the error:
Event code: 4009
Event message: Viewstate verification failed. Reason: The viewstate supplied failed integrity check.
Event time: 3/23/2011 8:54:31 PM
Event time (UTC): 3/24/2011 12:54:31 AM
Event ID: aaaa4d1a98f84f05a61e45a82178275c
Event sequence: 33
Event occurrence: 4
Event detail code: 50203
Application domain: /LM/W3SVC/6983/Root-1-129454012216742214
Trust level: Full
Application Virtual Path: /
Application Path: C:\Inetpub\vhosts\secure.xxx.com\httpdocs\
Machine name: HOST2-xxx
Process ID: 351124
Process name: w3wp.exe
Account name: HOST2-xxx\IWPD_2(xxx)
Request URL: https://secure.xxx.com:443/ClientForms/creditor_info_form.aspx
Request path: /ClientForms/creditor_info_form.aspx
User host address: 220.127.116.11
Is authenticated: False
Thread account name: HOST2-xxx\IWPD_2(xxx)
Exception message: Invalid viewstate.
Client IP: 18.104.22.168
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)
Mar 31, 2011 03:02 PM|jgsketch|LINK
Update: Went back in time in my event viewer and discovered that the increase in errors started at the same time we discontinued using a CDN and switched everything back to the one host. This doubled our bandwidth. So I could see how the load might increase
the number of errors.
Apr 02, 2011 11:53 AM|akhhttar|LINK
It seems that session/application object is automatically expiring on the server. There could be many reasons of that and are mostly related to the server configurations. I also faced the smiliar issues couple of times and the reason was always different
and related to server configuration. Event viewer can help you to figure out the real cause. Following smiliar thread might be helpful for you
Apr 04, 2011 12:48 AM|sirdneo|LINK
There are two main reason for above error:-
1- You are on a web garden/web farm and you have not set a machineKey in your web.config. You have to define a machineKey in your config file like this:-
<machineKey validationKey="21F090935F6E49C2C797F69BBAAD8402ABD2EE0B667A8B44EA7DD4374267A75D7AD972A119482D15A4127461DB1DC347C1A63AE5F1CCFAACFF1B72A7F0A281B" decryptionKey="ABAA84D7EC4BB56D75D217CECFFB9628809BDB8BF91CFCD64568A145BE59719F" validation="SHA1" decryption="AES"/>
To create a machine key you can checkout this link:-
2- Your application pool is restarting and causing above error. To resolve this reason see:-
Apr 04, 2011 11:15 AM|jgsketch|LINK
Thanks for the help. I actually surprised to not see the machine key in the web.config file. I will have the programmers take a look at that. I'll also check out the application pool issue. I did mention this to my hosting company before and they check everything
out and said it was good. but I'll do more research on that part. Thanks.
Apr 05, 2011 12:41 PM|jgsketch|LINK
Talked to my programmers. They said they tried to add the machinekey. However, because our wacky scripting, the global.asa file is not loading. Our current login and main customer account info is coded in classic ASP and our e-sign and other forms are all
done in .net. So the conflict is preventing the file from loading. Seems logical and fishy at the same time. Would like to get other peoples opinion on this before issuing a recode of the classic ASP. Thanks.
Apr 05, 2011 02:45 PM|Naved Hasan Khan|LINK
Viewstate generally fails when there is a slow response. You can try setting enableEventValidation="false" viewStateEncryptionMode="Never" in the web.config.
Hope it helps.