Setting Timeout Value For .NET Web Service


I have a web service written in C# that is living on a SharePoint site. I have modified the web.config with the following code:

    <httpRuntime executionTimeout="360" />


for the IIS Inetpub file, the SP ISAPI web.config file and the SP layouts web.config. I have also modified the machine.config file with the same code and tried to bump any timeouts that I see in IIS.

When I call this web service from a Windows C# application I can step into the web method and start debugging the variable but after a short time (~1 minute, maybe less) the variable values are no longer present because this gets returned:

System.Net.WebException "The request was aborted: The operation has timed out."

I am trying to figure out where the correct timeout values needs to be set and how. I restart IIS after I have made every change but nothing changes to give different results.


9/16/2011 1:41:25 AM

After creating your client specifying the binding and endpoint address, you can assign an OperationTimeout,

client.InnerChannel.OperationTimeout = new TimeSpan(0, 5, 0);
4/17/2014 2:50:45 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow