web service running on same thread

J

Joseph

Hi,

I have 2 web services (WS1 and WS2). The sessionstate of WS1 is InProc and
the sessionState of WS2 is Off. WS1 is calling a web method on WS2 from 2
different threads (i.e. WS1 triggered from 2 different sessions on different
browsers) simultaneously. However, the called web method on WS2 is running
on the same thread. Is it possible to make the web method on WS2 to run on
different threads?

thanks.

Joseph
 
S

Steven Cheng[MSFT]

Hi Joseph,

Thank you for using Microsoft NewsGroup Service. Based on your description,
you'd like to make a certain WebMethod to execute in different thread when
it is called by different requests? Is my understanding of your problem
correct?

Generally the WebMethod in ASP.NET webservice are all executed in a certain
Thread. The thread is not a ThreadPoolThread. So if you check the ThreadID
each time you called the webmethod, the ID is the same one. Also, there
isn't any attribute or property that can directly change or set this
feature. As for your situation, you want the second webmethod (called by
another stateful webmethod) run in multithread, would you please provide me
more information about the requirement of your program. Maybe we can look
for some other means to deal with it.
Also if you have any other questions on it , please feel free to let me
know.

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
S

Steven Cheng[MSFT]

Hi Joseph,


Have you had a chance to check out my preceding suggestion? If you have any
problem, please feel free to let me know.


Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top