title: ASP.NET Error:The state information is invalid for this page and might be corrupted
body: <p>I have no JQuery or other javascript changing values or html-structure. And I have no controls that is added dynamically.</p>
  
  <p>Still I get the error: <strong>The state information is invalid for this page and might be corrupted</strong></p>
  
  <p>The error occurs somewhat random. Here is how I can replicate the issue, aspx-file:</p>
  
  <pre><code>&lt;%@ Page ViewStateEncryptionMode ="Never" MaxPageStateFieldLength="40" ValidateRequest="false" Language="C#" AutoEventWireup="true" EnableEventValidation="false" CodeFile="tbTest.aspx.cs" Inherits="_Default" %&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;
  &lt;head runat="server"&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=edge" /&gt;
      &lt;title&gt;tbTest &lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;asp:Button id="Submit1" type="submit"  
          runat="server" onClick="btnclick_Click" Text="Submit" /&gt;&lt;br /&gt;
      &lt;asp:TextBox ID="tbStatus" enableViewState="true" runat="server" TextMode="MultiLine" 
          Width="617px" Height="67px" ReadOnly="True" Font-Size="Smaller"&gt;&lt;/asp:TextBox&gt;
      &lt;br /&gt;
     &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>.cs-file:</p>
  
  <pre><code>public partial class _Default : System.Web.UI.Page 
  {
      protected void Page_Init(object sender, EventArgs e)
      {
          if (!Page.IsPostBack)
          {
              DateTime timestamp = DateTime.Now;
              try
              {
                  tbStatus.Text = timestamp.ToString() + ". Page Loaded. ";
              }catch (Exception ex) {
              }
          }
      }
  
      protected void Page_Load(object sender, EventArgs e)
      {
          if (!Page.IsPostBack)
          {
              try
              {
                  Response.Cache.SetNoStore();
              } catch (Exception ex){
              } 
          }    
      }
  
      protected void btnclick_Click(object sender, EventArgs e)
      {
          DateTime timestamp = DateTime.Now;
          try
          {
              tbStatus.Text += Environment.NewLine + timestamp.ToString() + ". TextBox updated. ";
  
          } catch (Exception ex) {
              tbStatus.Text += Environment.NewLine + timestamp.ToString() + ". Error. " + ex.Message.ToString();
          }
      }
  }
  </code></pre>
  
  <p>This really gives me head-ache. After 3-4 submits the error is there. I have tested changing values for <strong>ViewStateEncryptionMode, MaxPageStateFieldLength, ValidateRequest, AutoEventWireup</strong> and  <strong>EnableEventValidation</strong> without success. </p>
  
  <p>What can be wrong?</p>