I've created one web service which is of asmx type. And I'm using my web service in the .net windows application.
Web method from the web service receives byte array conversion of the object & object of my class having different attributes in which i'm adding one xml file in the form of the string. When my string containing xml data increases then it gives me the "Time out" error while sending data to the the web service.
How to increase the timeout period of web service?
This question is tagged with
~ Asked on 2011-09-02 06:07:56
you can do this in different ways:
see here for more details on the second case:
and here for details on the last case:
~ Answered on 2011-09-02 06:19:04
1 - You can set a timeout in your application :
var client = new YourServiceReference.YourServiceClass(); client.Timeout = 60; // or -1 for infinite
It is in milliseconds.
2 - Also you can increase timeout value in httpruntime tag in web/app.config :
<configuration> <system.web> <httpRuntime executionTimeout="<<**seconds**>>" /> ... </system.web> </configuration>
For ASP.NET applications, the Timeout property value should always be less than the executionTimeout attribute of the httpRuntime element in Machine.config. The default value of executionTimeout is 90 seconds. This property determines the time ASP.NET continues to process the request before it returns a timed out error. The value of executionTimeout should be the proxy Timeout, plus processing time for the page, plus buffer time for queues. -- Source
~ Answered on 2014-01-25 10:43:19