Hi All,
I am calling an external web service from a windows service using C#.
The web service is in .NET. The Web method GetRandomNumber() returns a random integer. The GetRandomNumber() is invoked asynchronously The web service client code is as below:
Service1 s1 = new Service1();
s1.Timeout = 2000;
s1.GetRandomNumberCompleted += new GetRandomNumberCompletedEventHandler(s1_GetRandomNumberCompleted);
s1.GetRandomNumberAsync();
I am setting the timeout to 2secs (2000 ms). The web service call, in most of the cases takes 5-10 secs. But in this case the time out does not occur. Even after the timeout period is over, the client gets the data. I am missing some thing OR is there any other way to use time out while invoking the web service Asynchronously?
-N
;