WebService and Threads...
-
Hello ASP-World! I have a question about WebServices. I hope that this is the correct Message Board? I wanted to know, if WebServices runs in Threads, because I tried following: I added following code snippet to my WebService:
#region WebMethod TestIfRunsInThreads /// /// Test routine if webservice runs in threads. /// [WebMethod] public void TestIfRunsInThreads() { while (true) { } } #endregion
After that I tried to invoke this method from client, and how wonder I got no response :-) But simultaneously I tried with another client to invoke a different WebMethod and it resolves in timeout, too !?! I have the conclusion that WebServices do NOT run in Threads. Am I correct? Is it usefull to manage WebMethods in Threads, or how can I force this? For any help, I´m lucky... Ciao Norman-Timo -
Hello ASP-World! I have a question about WebServices. I hope that this is the correct Message Board? I wanted to know, if WebServices runs in Threads, because I tried following: I added following code snippet to my WebService:
#region WebMethod TestIfRunsInThreads /// /// Test routine if webservice runs in threads. /// [WebMethod] public void TestIfRunsInThreads() { while (true) { } } #endregion
After that I tried to invoke this method from client, and how wonder I got no response :-) But simultaneously I tried with another client to invoke a different WebMethod and it resolves in timeout, too !?! I have the conclusion that WebServices do NOT run in Threads. Am I correct? Is it usefull to manage WebMethods in Threads, or how can I force this? For any help, I´m lucky... Ciao Norman-TimoI can't imagine that web methods would not run in threads, as other web requests does. When you tried with another client, was that a separate computer or just a separate instance of the browser? If it was the later, are you sure that it was a separate instance, or just another window in the same session? IIS only services one request at a time from each session, it might do the same with web services. --- b { font-weight: normal; }
-
I can't imagine that web methods would not run in threads, as other web requests does. When you tried with another client, was that a separate computer or just a separate instance of the browser? If it was the later, are you sure that it was a separate instance, or just another window in the same session? IIS only services one request at a time from each session, it might do the same with web services. --- b { font-weight: normal; }
Thanx for your answer! Ok, that will bring me one step forward... I tried to connect from same computer, but really another instance of a browser! Once a firefox browser and other the IE browser. But It's possible that IIS only manages connections from other computers in other threads, like you described. I will test it now, same procedure, but the second request from another computer, and will tell the result here in this board... So long, Norman-Timo
-
Hello ASP-World! I have a question about WebServices. I hope that this is the correct Message Board? I wanted to know, if WebServices runs in Threads, because I tried following: I added following code snippet to my WebService:
#region WebMethod TestIfRunsInThreads /// /// Test routine if webservice runs in threads. /// [WebMethod] public void TestIfRunsInThreads() { while (true) { } } #endregion
After that I tried to invoke this method from client, and how wonder I got no response :-) But simultaneously I tried with another client to invoke a different WebMethod and it resolves in timeout, too !?! I have the conclusion that WebServices do NOT run in Threads. Am I correct? Is it usefull to manage WebMethods in Threads, or how can I force this? For any help, I´m lucky... Ciao Norman-TimoSo I tested a second way: I invoked the endless loop with one browser client of local system. Another client on another system (then browser will not accepted from webservice) tried to invoke another WebMethod out of my Service, and failed! I think it´s definetivly that my WebService don´t run in threads! And another suspecious point: After invoking once the endless loop, all later requests on my WebService fails, equal if the current request was aborted from clientside! He hangs in endless loop and only a reboot of the system will end this! I´m Very disappointed now :sigh: Ciao Norman-Timo