ASP.net session request queuing

前端 未结 1 1569
孤独总比滥情好
孤独总比滥情好 2020-11-30 10:42

It seems to me that ASP.net queues up all requests that use the same Session ID. Let\'s say you\'ve got 3 pages.

Default.aspx

protected void Page_Loa         


        
相关标签:
1条回答
  • 2020-11-30 11:27

    This behaviour is by design; no concurrent access to the session state is allowed. Requests with same SessionID will be locked exclusively to prevent potential corruption of its state.

    To get around this you can disable session state in your page directive.

    <%@ Page EnableSessionState="false" %>
    

    Read "Concurrent Requests and Session State" here http://msdn.microsoft.com/en-us/library/ms178581.aspx for more.

    Setting EnableSessionState="ReadOnly" will prevent that page from gaining an exclusive lock on the SessionState (but the page itself would have to wait for other non-ReadOnly requests by the user to finish before loading).

    (This is a copy and paste of my answer to this question ASP.net site: Long-loading page for user puts all other page loads for user on Hold)

    0 讨论(0)
提交回复
热议问题