ASP.NET application to serve multiple requests from a single process

倖福魔咒の 提交于 2019-12-18 09:13:43

问题


I am currently debugging some issue about this.

We have a ASP.NET web application and I am debugging on Cassini. When I tried to use IE and send out the request to the server, some time (e.g. in about 20minutes) is needed to process and then send out the response.

In case of multi-tab IE, I tried to send out the requests in different tab at about the same time to the same server but the response is handled only after the one of the response is sent out.

If a new instance of IE is started and the requests are sent out in these different instances, the server can process and send out the response almost simultaneously. After doing some research I found that IIS express may solve my problem, but I cannot. Anyone has experienced similar problem or have I missed out some really important things to check with first?

Thank you for your help.


回答1:


This is primarily due to ASP.net's session state variable and the fact that only one request at a time may have R/W access to a particular session (as determined by the SessionID cookie).

Any additional requests requiring any form of session access (since Read/Write is the default) will be blocked until the previous request has been completed.

Based on the following links:

  • http://johnculviner.com/asp-net-concurrent-ajax-requests-and-session-state-blocking/
  • https://msdn.microsoft.com/en-us/library/ms178581.aspx?f=255&MSPPError=-2147217396



回答2:


I think that you miss the point that the session is lock all request leaving only one per time to run.

Read about that and why: Replacing ASP.Net's session entirely

Also : Web app blocked while processing another web app on sharing same session




回答3:


The reason is that Sessions in ASP.NET are not thread safe. Therefore ASP.NET serializes access to requests from the same session.

If you have a multi-tab IE then your tabs share one session. The first request is executed right off and the other ones are queued. If you have different instances then each of them creates a new session and therefore the request are executed in parallel.



来源:https://stackoverflow.com/questions/10912995/asp-net-application-to-serve-multiple-requests-from-a-single-process

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!