Im currently developing client windows applications accessing web services. Im using VS.Net 2002. Now for the problems.
Timeout
It is to my understanding that sending synchronous web request will have a probability of experiencing time out. Im creating an instance of my web service with the name "mywebservice".
Now Im accessing a web service method; lets say Method1. When Im executing mywebservice.Method1(), I get "The operation timed out" exception message.
An immediate solution to this problem was setting the timeout property of mywebservice to -1: mywebservice.Timeout = -1
Done. Too bad that solution doesnt last long enough. It leads to problem number two.
Underlying Connection was Closed
Yupe. Its a System.Net.WebException. The client cannot retrieve the response because the connection to the web server is closed. Closed? After reading a few references I discovered that it is due to the connection being timed-out but the client still thinks its open. What the ... @_@
Adding to the confusion is that the exception doesnt always occurred. Sometimes the code works perfectly fine without a single exception. Whats with this behavior?
Im kinda stuck here. Id appreciate any help you have to offer.
But Ive already set the time
Timeout
It is to my understanding that sending synchronous web request will have a probability of experiencing time out. Im creating an instance of my web service with the name "mywebservice".
Now Im accessing a web service method; lets say Method1. When Im executing mywebservice.Method1(), I get "The operation timed out" exception message.
An immediate solution to this problem was setting the timeout property of mywebservice to -1: mywebservice.Timeout = -1
Done. Too bad that solution doesnt last long enough. It leads to problem number two.
Underlying Connection was Closed
Yupe. Its a System.Net.WebException. The client cannot retrieve the response because the connection to the web server is closed. Closed? After reading a few references I discovered that it is due to the connection being timed-out but the client still thinks its open. What the ... @_@
Adding to the confusion is that the exception doesnt always occurred. Sometimes the code works perfectly fine without a single exception. Whats with this behavior?
Im kinda stuck here. Id appreciate any help you have to offer.
But Ive already set the time