balaweblog
balaweblog

Reputation: 15470

Timeout period in Webservices

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

Upvotes: 0

Views: 828

Answers (1)

JaredPar
JaredPar

Reputation: 755557

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();
}

Upvotes: 2

Related Questions