Home  /  Questions  /  Question

250   96.9
Sep 21, 2010

How to overcome web service timeout?

I have a web application which sends some message to a web service. The web service then pass on the message to data access service (which is a window service). The data access service connects to database and get the data from different tables and the work on the data and send the custom response to web service which then pass on the response to ui application.
The problem i am facing is web service gets time out while windows service is still doing the data manipulation and creating the response. how can a keep the web service alive for that particular request without getting time out.

50   50
Oct 01, 2010
There are actually 2 ways to configure time out:

--- On the server side, you can set/change this time out in web.config See: <httpRuntimeexecutionTimeout="..."/>
--- On the client side, you can set Timeout property in class called SoapHttpClientProtocol

340   99.9
Oct 23, 2010
Service Timeout value can be set in three places

A. To increase the Timeout property of the Web service proxy.
        MyServiceRef serviceRef= new MyServiceRef();
        obj.Timeout = -1; // -1 for infinite or + any positive value in milliseconds
B. To Increase Increase timeout value in httpruntime tag in web/app.config of ASP.NET

        <httpRuntime executionTimeout="<<milliseconds>>" />

C. To increase timeout value in httpruntime tag in web-config of Web Services

adviced locaiton is cliend side, don't play with at serverside. it might effect other clients.

Hops this helps