tags:

views:

386

answers:

1

I need to change the timeout period of my webservice which was invoked by .net console application.

How to change the timeout period.

Its not hosted in IIS. Its single WSDL. I dont want to write any code. I need to change it in app.config

+1  A: 

Most web services eventually derive from WebClientProtocol. This class has a timeout property that can used to alter the timeout. Set it before invoking the service and it should do the trick.

Example

void SomeMethod() {
  SomeWebService v1 = new SomeWebService();
  v1.Timeout = 1000;
  v1.AWebServiceCall();
}
JaredPar
Either this is correct and we're all baffled why such a question was asked... or he only has control of the web service and wants to do this from inside the web service and doesn't understand it's not possible.
His post mentions app.config vs. web.config so I'm guessing it's client side
JaredPar
Doesn't work for me(.NET 4, Silverlight 4, SOAP)
WmasterJ