"The state information is invalid for this page and might be corrupted" With ASP.NET AJAX

Posted by Venkat | Labels:

If you got this error while you working with Asp.Net AJAX.

This seems to be caused by Firefox's methods for saving session information in its cache. There is many way to solve this problem it’s depending on how extensive you want to disable the cache. In my case, I just wanted to do it on one page, so at the top of Page_Load I added:

Response.Cache.SetNoStore();


Set the page Declaration with

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Page.aspx.cs" Inherits="Main" Title=My Home" EnableViewStateMac ="false" EnableSessionState="True" EnableEventValidation ="false" ValidateRequest ="false" ViewStateEncryptionMode ="Never" %>
You can also add with web.config file

<pages validaterequest="false" enableeventvalidation="false" viewstateencryptionmode="Never">
</pages>

PayOffers.in