Click here to Skip to main content
15,920,687 members
Home / Discussions / C#
   

C#

 
GeneralHandling ActiveX control events in .Net Pin
Anonymous14-May-03 18:21
Anonymous14-May-03 18:21 
QuestionEquiv of DrawState() API in .NET? Pin
J. Dunlap14-May-03 12:21
J. Dunlap14-May-03 12:21 
AnswerRe: Equiv of DrawState() API in .NET? Pin
James T. Johnson14-May-03 14:06
James T. Johnson14-May-03 14:06 
GeneralRe: Equiv of DrawState() API in .NET? Pin
J. Dunlap14-May-03 14:12
J. Dunlap14-May-03 14:12 
GeneralRe: Equiv of DrawState() API in .NET? Pin
James T. Johnson14-May-03 14:16
James T. Johnson14-May-03 14:16 
GeneralRe: Equiv of DrawState() API in .NET? Pin
J. Dunlap14-May-03 14:42
J. Dunlap14-May-03 14:42 
GeneralRe: Equiv of DrawState() API in .NET? Pin
J. Dunlap14-May-03 20:37
J. Dunlap14-May-03 20:37 
GeneralPlease, tell me WebServices are not stupid! Pin
Daniel Turini14-May-03 11:28
Daniel Turini14-May-03 11:28 
Well, beforehand I need to say I must be doing something fundamentally wrong, but I simply cannot see it. Maybe it’s something on machine.config, or web.config, but I was not able to find it anywhere else.
The problem is: my webservices are being handled in a single thread on the server. I compiled release, disabled debugging, tried almost everything. And my webservice seems to be handled only on a single thread.
A simple code that shows this is:

[WebMethod]
public int MyWait(int Waittime)
{
    DateTime dt = DateTime.Now.AddSeconds(Waittime);
    while (DateTime.Now < dt)
    	;
    return Waittime;
}


As you can see, if you start the webservice and quickly call it twice (I’m testing with IE and the quick test page), passing 20s as the time, you should have both answers in 20s, if there were two threads. The problem is:the second request returns after 40s.
I know that changing this loop for Sleep() solves the problem, but my real code is much more complicated, and has to process several requests simultaneously.

I simply cannot believe that ASP.NET webservices are single threaded.



My latest article: GBVB - Converting VB.NET code to C#
GeneralRe: Please, tell me WebServices are not stupid! Pin
leppie14-May-03 12:15
leppie14-May-03 12:15 
GeneralRe: Please, tell me WebServices are not stupid! Pin
James T. Johnson14-May-03 13:53
James T. Johnson14-May-03 13:53 
GeneralPass byte[] -> struct Pin
Wizard_0114-May-03 10:33
Wizard_0114-May-03 10:33 
GeneralRe: Pass byte[] -> struct Pin
Richard Deeming15-May-03 8:45
mveRichard Deeming15-May-03 8:45 
GeneralPicture Control Issues Pin
RB@Emphasys14-May-03 9:36
RB@Emphasys14-May-03 9:36 
GeneralRe: Picture Control Issues Pin
leppie14-May-03 9:41
leppie14-May-03 9:41 
GeneralDownloading Pin
Brian Delahunty14-May-03 9:23
Brian Delahunty14-May-03 9:23 
GeneralRe: Downloading Pin
leppie14-May-03 9:42
leppie14-May-03 9:42 
GeneralRe: Downloading Pin
Brian Delahunty14-May-03 10:02
Brian Delahunty14-May-03 10:02 
GeneralRe: Downloading Pin
David Stone14-May-03 10:08
sitebuilderDavid Stone14-May-03 10:08 
GeneralRe: Downloading Pin
Brian Delahunty14-May-03 10:18
Brian Delahunty14-May-03 10:18 
GeneralRe: Downloading Pin
leppie14-May-03 11:06
leppie14-May-03 11:06 
GeneralAxSHDocVw.AxWebBrowser Pin
toanlb14-May-03 9:19
toanlb14-May-03 9:19 
GeneralTesting plan for C# application... Pin
Josh Martin14-May-03 8:14
Josh Martin14-May-03 8:14 
GeneralRe: Testing plan for C# application... Pin
leppie14-May-03 9:22
leppie14-May-03 9:22 
GeneralRe: Testing plan for C# application... Pin
Jeff Martin18-May-03 8:12
Jeff Martin18-May-03 8:12 
QuestionImplementing IPersistStream? Pin
solidstore14-May-03 8:11
solidstore14-May-03 8:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.