Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SOAP Request Timeout in Console App (.NET)

I have a SOAP web service added to a console app and every time I make a specific call its timing out on me. Other calls work fine. How do I increase the timeout length in a console app? Seems like it's currently about 90 seconds.

Thanks.

like image 225
Wes P Avatar asked Jul 19 '26 23:07

Wes P


1 Answers

You can set the web service client timeout by setting the Timeout property. The default is 100000 milliseconds (100 seconds).

For example:

MyWebServices.Webservice svc = new MyWebServices.Webservice();
// Set timeout to 200 seconds
svc.Timeout = 200000;
svc.DoWork();
like image 74
Kev Avatar answered Jul 22 '26 15:07

Kev