title: IE double postback hangs IIS 7 in Integrated Managed pipeline mode when session is accessed
body: <p>Here's my environment:
  IIS7.5 on Win 7, .NET 4, App Pool Integrated</p>
  
  <p>web.config</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Test.aspx</p>
  
  <pre><code>&lt;%@ Page Language="C#" %&gt;
  
  &lt;!DOCTYPE html&gt;
  &lt;script runat="server"&gt;
      protected void OnAction(object sender, EventArgs e)
      {
          int count;
          status.Text = (int.TryParse(status.Text, out count) ? count + 1 : 0).ToString();
  
          Session["test"] = count;
      }
  &lt;/script&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;IIS Session Hang Test&lt;/title&gt;
      &lt;script&gt;
          var mutiPostback = function () {
              var e = document.getElementById('LinkButton1');
              e.click();
              e.click();
          };
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="Form1" method="post" runat="server"&gt;
          &lt;asp:ScriptManager runat="server" ID="SM"&gt;
          &lt;/asp:ScriptManager&gt;
          &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt;
              &lt;Triggers&gt;
                  &lt;asp:AsyncPostBackTrigger ControlID="LinkButton1"/&gt;
              &lt;/Triggers&gt;
              &lt;ContentTemplate&gt;
                  &lt;asp:Label runat="server" ID="status" /&gt;
              &lt;/ContentTemplate&gt;
          &lt;/asp:UpdatePanel&gt;
          &lt;input type="button" id="button1" onclick="mutiPostback();" value="MultiPostback"/&gt;
          &lt;div style="display: none"&gt;
              &lt;asp:Button ID="LinkButton1" runat="server" OnClick="OnAction" Text="Click" /&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Yes, the multiple postback is intentional, we notice this behavior will cause many request stuck in RequestAcquireState and ultimately prevent any new requests being accepted by the server. However, this problem is only observable under IE and not on Chrome or FF.</p>
  
  <p>To test, continuously clicking the multiple postback button. This will update the status number. You'll then be able to observe that number stop increasing when using IE, indicating the request stuck issue.</p>
  
  <p>I was able to produce this issue with following IIS and IE versions:</p>
  
  <p>IIS versions tested</p>
  
  <ol>
  <li>7.5.7600.16385 on Windows Server 2008 R2 with .Net 4.5 Installed</li>
  <li>7.5.7600.16385 on Windows 7 Pro with .Net 4.5 Installed</li>
  </ol>
  
  <p>IE version tested</p>
  
  <ol>
  <li>9.0.8112.16421 on Windows 7 Pro</li>
  <li>8.0.7600.16385 on Windows Server 2008 R2</li>
  <li>6.0.3790.3959 on Windows Server 2003 SP2</li>
  </ol>
  
  <p>An anomaly I observed, is that when accessing local IIS, 8.0.7600.16385 on Windows Server 2008 R2 does NOT cause this blocking issue. But if I use the browser to access a remote IIS, then the issue can be reproduced. While on IE 9 I can reproduce the issue regardless if IIS is on remote or local.</p>
  
  <p>Here's a screen shot of how the hanged request look like in request list for worker process.</p>
  
  <p><img src="https://i.stack.imgur.com/1CXe0.png" alt="Stuck Requests">
  Now we have found a few ways to get around this problem, but none are acceptable in our situation:</p>
  
  <ol>
  <li>Remove/Comment out Session usage.</li>
  <li>Change app pool to Classic mode.</li>
  </ol>
  
  <p>NOTE: we also found that even if we don't directly use Session as shown in the example, the problem still occurs. IE: if we add a Global.asax.cs and add an empty Session_Start event handler, the request will still hang in RequestAcquireState.</p>
  
  <p>Does anyone have a clue why this is happening and how can we resolve this issue that only seem to happen in Integrated managed pipeline mode?</p>