w0051977
w0051977

Reputation: 15787

ASP.NET lifecycle start

I understand that ASP.NET uses worker threads to listen for page requests. I am trying to track down a bug in an application.

A user accesses a webpage i.e. page1.aspx. This page takes twenty seconds to load. If after ten seconds they open another browser and access the page again (leaving the other browser window open and loading the webpage), then I assume that the second request for page1.aspx will not start generating on the server until the first request for page1 is sent back to the client? i.e. there is only one worker thread per user session?

I have spent some time investigating and have found many posts about what worker threads and I/O threads are, however I have not found an answer to my specific question.

Upvotes: 1

Views: 59

Answers (1)

Andomar
Andomar

Reputation: 238058

If you click refresh, the browser will first end the running request. It does that by closing the TCP connection to the server. When the server tries to return data to the client, it will throw an exception. For example a "The remote host closed the connection." exception. This exception should end the first request.

Next the browser sends a new request to the server, and that starts running.

There is no limit on the amount of workers per user session. You can open three browser tabs at the same time, and they can all make a request to the server at the same time. However, most browsers limit the amount of simultaneous requests they send to a single server.

Upvotes: 1

Related Questions