Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

IE double postback hangs IIS 7 in Integrated Managed pipeline mode when session is accessed

$
0
0

Here's my environment:
IIS7 on Win 7, .NET 4, App Pool Integrated

web.config

<?xml version="1.0" encoding="UTF-8"?><configuration></configuration>

Test.aspx

<%@ Page Language="C#" %><!DOCTYPE html><script runat="server">
        protected void OnAction(object sender, EventArgs e)
        {
            int count;
            status.Text = (int.TryParse(status.Text, out count) ? count + 1 : 0).ToString();
            Session["test"] = count;
        }</script><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><title>IIS Session Hang Test</title><script>
            var mutiPostback = function () {
                var e = document.getElementById('LinkButton1');
                e.click();
                e.click();
            };</script></head><body><form id="Form1" method="post" runat="server"><asp:ScriptManager runat="server" ID="SM"></asp:ScriptManager><asp:UpdatePanel ID="UpdatePanel1" runat="server"><Triggers><asp:AsyncPostBackTrigger ControlID="LinkButton1"/></Triggers><ContentTemplate><asp:Label runat="server" ID="status" /></ContentTemplate></asp:UpdatePanel><input type="button" id="button1" onclick="mutiPostback();" value="MultiPostback"/><div style="display: none"><asp:Button ID="LinkButton1" runat="server" OnClick="OnAction" Text="Click" /></div></form></body></html>

Yes, the multiple postback is intentional, we notice this behavoir 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 (IE6 ~ 9) and not on Chrome or FF.

Here's a screen shot of how the hanged request look like in request list for worker process.

Stuck Requests

Now we have found a few ways to get around this problem, but none are acceptable in our situation:

1. Remove/Comment out Session usage.
2. Change app pool to Classic mode.

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.

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?


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>