Fixing ASP.NET error: The state information is invalid for this page and might be corrupted.


I’ve been running dasBlog for several months now and I’d been having problems with my login timing out very quickly. I added a $g(HealthMonitoring) section to my web.config so as to get email notifications when errors occurred. Right away I noticed that simply refreshing the browser could trigger an authentication error like:

Forms authentication failed for the request. Reason: 
The ticket supplied was invalid.

I $g(Googled) for ways to resolve these errors and found this article from my web hosting provider no less. I then used the online machinekey generator and added it to my web.config and my dasblog login errors were history as well as the invalid viewstate problems! Basically, the key used for encrypting the authentication information was getting changed between request as a result of either the server or the ASP.NET worker process being recylced.

<providerplug>
You can probably tell I really like DiscountASP.NET they’ve got a great options, a great control panel (which is frequently enhanced) and they have some great technical staff who post to their support forums. I’ve gone so far as to join their referral program, so if you sign up please use the link above which includes my referral ID to let them know I sent you!
</providerplug>