Hi Cj,
ASP.NET webservice use the same threading model as ASP.NET webform
application. ASP.NET runtime pickup a worker thread from .NET clr
threadpool to process each comming request and release it back to the pool
after finishs the request. Here is a very good reference about ASP.NET
threading model:
#Microsoft ASP.NET Threading
http://support.microsoft.com/default.aspx?scid=/servicedesks/webcasts/en/tra
nscripts/wct060503.asp
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Date: Sat, 26 Jan 2008 23:31:12 -0500
From: cj <cj@nospam.nospam>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Subject: Re: multi tasking?
This is just an example.
[quoted text, click to view] Dave wrote:
> just remember though, somewhere everything has to add up or you will run
out
> of one resource or another. having the web app run multi-threaded so
users
> don't have to wait for it is fine, but if each query still takes 15
seconds
> from the database it has to be able to handle the multiple simultaneous
> requests also. if the database server can't handle a request every 2 or
3
> seconds eventually you will not be able to connect, it will crash, or
> something else bad will happen.
>
> "cj" <cj@nospam.nospam> wrote in message
> news:Ov$krh5XIHA.4684@TK2MSFTNGP06.phx.gbl...
>> Excellent. I had hoped it would. Now bear with me a minute. If part
of
>> the processing is to make a sql connection and look up data, I'd assume
>> that each thread would make it's own connection--correct?
>>
>>
>> John Saunders [MVP] wrote:
>>> "cj" <cj@nospam.nospam> wrote in message
>>> news:%23COKHb5XIHA.4896@TK2MSFTNGP06.phx.gbl...
>>>> Strictly as an example, suppose I write a web service that takes an
>>>> employee number and then does some processing and returns their
security
>>>> clearance, name, department or some such stuff. Again for arguments
>>>> sake say this processing takings about 15 seconds each time. Lastly
>>>> assume there are lots of people making inquiries via this web service
>>>> and at some times of the day we get a request every 2 or 3 seconds.
Can
>>>> a web service start a new request if it hasn't finished the previous
>>>> one? Is it multi-tasking or multi-threaded by nature or is there
>>>> something I need to do to allow it to do this? The object is nobody
>>>> should have to wait for a previous request to finish for their request
>>>> to start.
>>> ASP.NET will start a new worker thread per request.
>