By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,847 Members | 2,392 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,847 IT Pros & Developers. It's quick & easy.

Are ASP.NET requests multi-threaded?

P: n/a
I assumed that requests to my app are multi-threaded in that is there are 2
browsers making requests at the same time, I could be in the middle of
responding to one when I get the next.

But what I am finding in my debugger is that if they are backed up, I still
get just one at a time. Is this just the VS 2005 integrated web server that
has this behavior?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
Nov 10 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
I would say that it is probably definite a limitation of the built-in VS web
server. It's really hard to test with the built-in web server, simply
because it doesn't represent a real-world scenario as using IIS would.
There's a transcription of a good webcast on how ASP.Net is threaded and how
it interacts with IIS at:
http://support.microsoft.com/default.../wct060503.asp

--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"David Thielen" <th*****@nospam.nospamwrote in message
news:13**********************************@microsof t.com...
>I assumed that requests to my app are multi-threaded in that is there are 2
browsers making requests at the same time, I could be in the middle of
responding to one when I get the next.

But what I am finding in my debugger is that if they are backed up, I
still
get just one at a time. Is this just the VS 2005 integrated web server
that
has this behavior?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm


Nov 10 '06 #2

P: n/a
Thanks for Mark's informative input.

Hi Dave,

I haven't done exact test under test server, however, I think it quite
straighforward to do a simple test. You can create a page and use
Thread.Sleep to thread for seconds to make it take long to return. After
that, you can open multiple browsers to access that page, you can print
out the threadID to see the threading behavior. IMO, test server is also
multi-threading based and will not process all the requests on a single
shared thread.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 10 '06 #3

P: n/a
If your two browsers are making requests from the same client (ie. a browser
and a new window of that browser) then you could be simply sharing the same
session and thus seeing blocking. Any methods or actions to an app with a
session requirement can block the session state access until the first
request completes, or it appears to be single threaded when in fact its two
requests from the same client.

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Mark Fitzpatrick" <ma******@fitzme.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>I would say that it is probably definite a limitation of the built-in VS
web server. It's really hard to test with the built-in web server, simply
because it doesn't represent a real-world scenario as using IIS would.
There's a transcription of a good webcast on how ASP.Net is threaded and
how it interacts with IIS at:
http://support.microsoft.com/default.../wct060503.asp

--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"David Thielen" <th*****@nospam.nospamwrote in message
news:13**********************************@microsof t.com...
>>I assumed that requests to my app are multi-threaded in that is there are
2
browsers making requests at the same time, I could be in the middle of
responding to one when I get the next.

But what I am finding in my debugger is that if they are backed up, I
still
get just one at a time. Is this just the VS 2005 integrated web server
that
has this behavior?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm



Nov 10 '06 #4

P: n/a
I think it's the test server but I just wanted to make sure my understanding
of IIS is correct.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm


"John Timney (MVP)" wrote:
If your two browsers are making requests from the same client (ie. a browser
and a new window of that browser) then you could be simply sharing the same
session and thus seeing blocking. Any methods or actions to an app with a
session requirement can block the session state access until the first
request completes, or it appears to be single threaded when in fact its two
requests from the same client.

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Mark Fitzpatrick" <ma******@fitzme.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
I would say that it is probably definite a limitation of the built-in VS
web server. It's really hard to test with the built-in web server, simply
because it doesn't represent a real-world scenario as using IIS would.
There's a transcription of a good webcast on how ASP.Net is threaded and
how it interacts with IIS at:
http://support.microsoft.com/default.../wct060503.asp

--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"David Thielen" <th*****@nospam.nospamwrote in message
news:13**********************************@microsof t.com...
>I assumed that requests to my app are multi-threaded in that is there are
2
browsers making requests at the same time, I could be in the middle of
responding to one when I get the next.

But what I am finding in my debugger is that if they are backed up, I
still
get just one at a time. Is this just the VS 2005 integrated web server
that
has this behavior?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm



Nov 10 '06 #5

P: n/a
IIS hosted ASP.NET should always be multi-threaded and it will leverage
thread pool threads to process each coming requests. And I suppose the VS
2005 testserver will also use threadpool threads to process multi-requests
simultaneously. Anyway, you can simply use some long-run page to test the
exact behavior in test server.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 13 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.