472,146 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 software developers and data experts.

Are ASP.NET requests multi-threaded?

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
5 1288
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
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
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
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
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.

Similar topics

3 posts views Thread by Fakhar | last post: by
3 posts views Thread by Wendy Elizabeth | last post: by
3 posts views Thread by Tony | last post: by
4 posts views Thread by rzimerman | last post: by
8 posts views Thread by Michael Schwarz | last post: by
7 posts views Thread by =?Utf-8?B?Vkg=?= | last post: by
reply views Thread by Saiars | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.