c# Multiple WebRequest and WebResponse timeout problems.

Hi Everyone ,

In this tips and tricks article i wanna talk about when we use Multiple WebRequest object for interacting some urls getting timeout errors even if remote server not busy.
this is usually caused by not dispose some open WebResponse objects.You can also use “using” statement for disposing unnecessery objects .

For good example :

WebRequest wrGETURL;
wrGETURL = WebRequest.Create(sURL);
// wrGETURL.Proxy = myProxy;

durationTime = DateTime.Now;

(HttpWebResponse response = (HttpWebResponse)wrGETURL.GetResponse())
status = response.StatusCode.ToString();
TimeSpan ts = DateTime.Now – durationTime;
duration = ts.TotalMilliseconds.ToString();


Moss 2007 web enabled Infopath form timeout troubleshooting

This is an old problem but lastly i handle a case and fallowed below troubleshooting.

1) Check the InfoPath service timeout configuration. Central Administration -> (InforPath Form Services Section) Configure Infopath forms service.
Check “Data Connection Timeouts” as milliseconds.

Check “Form Session State” Active session should be terminated after option

2) Check your web application timeouts from IIS by open IIS mmc and right click your sharepoint site.

3) Check your sharepoint web.config file for HttpRuntime.executionTimeout value :

<httpruntime maxRequestLength=”51200″ executionTimeout=”7200” />

Optional Int32 attribute.
Specifies the maximum number of seconds that a request is allowed to execute before being automatically shut down by ASP.NET.This time-out applies only if the debug attribute in the compilation element is False. If the debug attribute is True, to help avoiding application shut-down while you are debugging, do not set this time-out to a large value.The default is 110. In the .NET Framework 1.0 and 1.1, the default is 90 seconds.