Response.Cache.SetNoStore();You could also set this in the page declaration with:
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="account.aspx.cs" Inherits="Main" Title="My Account" EnableViewStateMac ="false" EnableSessionState="True" EnableEventValidation ="false" ValidateRequest ="false" ViewStateEncryptionMode ="Never" %>
You could also add something like the below to Web.config:
<pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode ="Never">
6 comments:
Dear Mattio,
Wow...Great Post...I got the same problem "The state information is invalid for this page and might be corrupted" and tried on so many web sites for the solution. I couldn't find the solution and spent lot of my time. Your solution is exceptional and worked well. Thanks alot for your post.
Regards,
Veera.
shot mattio! u da man!
You guys rock! I just updated the web.config file with the information from this article and "voila!" A problem that I've been trying to get fixed for over two weeks is now magically resolved! Thank you!!!! :-)
Hi guys.. I am getting same error, i implemeted all these solutions, but it could not resolve the issue. when i remove jquery then update panel works otherwise it works only 2 time and third time it generates error.
If anyone have any solution, please post here...
Thanks for the great solution, i had a old website with ASP.NET 1.0 with this problem... searched for 3 days before i came on your blog! thnx a lot!
great u guy!!
It works !
Thanks,Sir!!
Post a Comment