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

3

3

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.

Fca answered 6/6, 2012 at 11:8 Comment(0)
P
3

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:

Pye answered 20/4, 2016 at 19:19 Comment(0)
D
1

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

Dukie answered 6/6, 2012 at 11:13 Comment(2)
OK, let me check with the links to see if my problem can be solved. Thank you very much!Fca
@redcomethk There not a problem, is how session works, and solve also other synchronizations problems . If you wish to avoid this happening you need to turn off session, or not used at least for the page that tame more than some seconds to complete. Or made a totally custom session (this is what I do) and handle the data as you like.Dukie
T
0

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.

Tyler answered 6/6, 2012 at 11:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.