473,683 Members | 2,848 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_windwa rd_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
Nov 10 '06 #1
5 1353
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******** *************** ***********@mic rosoft.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_windwa rd_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******@fitzm e.comwrote in message
news:%2******** ********@TK2MSF TNGP03.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******** *************** ***********@mic rosoft.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_windw ard_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_windwa rd_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******@fitzm e.comwrote in message
news:%2******** ********@TK2MSF TNGP03.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******** *************** ***********@mic rosoft.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_windwa rd_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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3117
by: Fakhar | last post by:
Hi All, How can I check fake requests on my webpage. I am asking for email address as input and I wounder if anyone write a program to send fake requests and my system will be busy to respond those requests. Specifically, I want to check if more than 10 requests from same IP in last One minute then my Website should not respond to that IP. Take care
16
7506
by: noah | last post by:
Does PHP have a feature to associate Cookie sessions with a persistent database connection that will allow a single transaction across multiple HTTP requests? Here is how I imagine my process: I have an series of interactive HTML forms. The user begins a Cookie session. A database connection is opened and a transaction is begun. After the user goes through any number of pages where they update the database they finish on a page where...
11
4949
by: Ohaya | last post by:
Hi, I'm trying to understand a situation where ASP seems to be "blocking" of "queuing" requests. This is on a Win2K Advanced Server, with IIS5. I've seen some posts (e.g., http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=Tidy7IDbDHA.2108%40cpmsftngxa06.phx.gbl) that indicate that ASP will queue up requests when they come in with the same "session".
5
3230
by: PerryG | last post by:
We have a .NET 1.1 client which is sending a gzipped soap request using HttpWebRequest to an Apache server. The Apache server is using a the 'mod_deflate' server to decompress the incoming message, and to also compress the response (GZIP). The mod_deflate filter requires the 'Content-Length' header contained within the incoming request to specify the number of UNCOMPRESSED bytes being sent and not the actual bytes of the body of the...
0
895
by: Larry D | last post by:
I have a web service that contains a WebMethod that takes a request object as a param and returns a response object. I have a test method for NUnit that spools n threads and each thread fires the web method. My results are showing me that even though the threads are being created at the same time, the web method call is taken incrementally longer for each thread in it's terminating order. This also happens when I do true multi-user /...
3
1325
by: Wendy Elizabeth | last post by:
I am going to be writing a web service in Visual Basic .NET internally for my company. This web service is going to be setup to send various kinds of messages to the internet since the main production servers currently reside in the DMZ. The main production servers are in the DMZ and are behind a firewall so they are not able to send messages externally to the internet. This internal Visual Basic.NET web service will be calling various...
3
2889
by: Tony | last post by:
I've done a fair bit of searching on this, but I want to be certain about what I've found - so here goes with a long example and three questions: For clarity, let me give an example (a number of the pages I found had some ambiguity). Say I have a page with 2 buttons ( A and B, for simplicity) and each button will make a different "ajax" request, for data to be placed in a corresponding DIV. For sake of example, we won't consider...
4
4596
by: rzimerman | last post by:
I'm hoping to write a program that will read any number of urls from stdin (1 per line), download them, and process them. So far my script (below) works well for small numbers of urls. However, it does not scale to more than 200 urls or so, because it issues HTTP requests for all of the urls simultaneously, and terminates after 25 seconds. Ideally, I'd like this script to download at most 50 pages in parallel, and to time out if and only...
8
1989
by: Michael Schwarz | last post by:
Hi, I have a problem where I have two requests (i.e. two different windows that are using the same session) that are accessing the session collection. The requests will need more time on the server, but I get the problem that the two sessions are not getting updated values from each requests. Is this by design or is there any solution to do this? -- Best regards | Schöne Grüße
7
3143
by: =?Utf-8?B?Vkg=?= | last post by:
Hi, all. Need help with what seems to be either connection, or threading problem in my ASP.NET 2.0 application. The gist of the problem is this: IHttpHandler in my application serves an HTML page that has two images (image A and image B) in it. Once the HTML page is served, expected behavior is this: 1) receive request for image A, 2) receive request for image B almost at the same time as for A,
0
8568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8504
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9042
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8771
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7581
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6429
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5789
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4299
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4519
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.