When you call C # WebService service, error, The operation has timed out, which means "The operation timed out."
Method / Step
-
First modify the server configuration
WebService service for the site where the service side, it provides a service, open the web.config this site, add the following configuration:
<httpRuntime executionTimeout="300000" />
<compilation defaultLanguage="c#" debug="false">
executionTimeout = "300000" units "ms", the configuration here is 5 minutes.
debug = "false" to disable the debugging.
If the web.config already has two configurations, change it on the line. If not, add up, complete structural sequence is as follows:
<configuration>
<system.web>
<httpRuntime executionTimeout="300000" />
<compilation defaultLanguage="c#" debug="false">
</compilation>
</system.web>
</configuration>
-
Modify the caller client configuration
YourService. YourService model = new YourService. YourService ();
model.Timeout = 300000; // milliseconds, set time, or time overrun
Here to serve as a model to set the timeout Timeout 300,000 milliseconds.
Method / Step
-
First modify the server configuration
WebService service for the site where the service side, it provides a service, open the web.config this site, add the following configuration:
<httpRuntime executionTimeout="300000" />
<compilation defaultLanguage="c#" debug="false">
executionTimeout = "300000" units "ms", the configuration here is 5 minutes.
debug = "false" to disable the debugging.
If the web.config already has two configurations, change it on the line. If not, add up, complete structural sequence is as follows:
<configuration>
<system.web>
<httpRuntime executionTimeout="300000" />
<compilation defaultLanguage="c#" debug="false">
</compilation>
</system.web>
</configuration>
-
Modify the caller client configuration
YourService. YourService model = new YourService. YourService ();
model.Timeout = 300000; // milliseconds, set time, or time overrun
Here to serve as a model to set the timeout Timeout 300,000 milliseconds.