I am making a post from a .NET console app to a .NET web service. I know that the timeout on the server side is 20 min, but if my client takes more than 100 seconds to post my data to that service then I get a timeout exception. How would I tell my client to wait the available 20 min to timeout?
+3
A:
on the client side, your webservice object has a timeout value. It should be pretty easy to set by going:
myServiceInstance.Timeout = 1200000
for 20 minutes
lomaxx
2008-11-12 22:04:04
A:
Yup the ServiceInstance.Timeout
is the property to set.
I blogged about it here http://stackpanel.com/blog/2008/10/client-timeout-accessing-asmx-web-service/
Vin
2008-11-12 22:06:42
Blog link Page Not Found (404)
YeahStu
2009-06-26 17:30:18
+2
A:
You need to verify that <httpRuntime executionTimeout="1200"/> exists in the web.config on the webservice itself to confirm your 20 minutes.
The service proxy class instance in your console app also needs to be set. There is a Timeout property to set (in milliseconds) so you would do something like this:
MyServiceClass myService = new MyServiceClass(); myService.Timeout = 1200000;
wulimaster
2008-11-12 22:09:41
We need the Gmailish notifications that someone has posted to this question for us people who don't type as fast as the others ;->
wulimaster
2008-11-12 22:13:10
+1 for mentioning that you have to do it on the client and on the server.
quillbreaker
2009-07-13 15:00:41