The default timeout for an Http Request in SharePoint Foundation 2010 is 120 seconds*. Any Http Requests above this 120 seconds will be met with a “Request timed out” error as displayed in the SharePoint logs:
Unexpected System.Web.HttpException: Request timed out.
Note: The SharePoint logs can be found at:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS
To increase this timeout you will need to modify the web.config file for the SharePoint Website. If you are using the default SharePoint configuration, then the web.config file will be found at:
Open this file in Notepad and then scroll down to the system.web > httpRuntime element (about half way down the file). To increase the timeout, add the executionTimeout attribute to the httpRuntime element with a value of the number of seconds for the timeout. For example, to increase the timeout to 5 minutes, add an executionTimeout of 300 like this:
<httpRuntime maxRequestLength="51200" executionTimeout="300" />
In the default SharePoint Foundation 2010 web.config file it will look like this:
Save the web.config file and now the timeout for HttpRequests will have been increased (Of course you need to ask why a request is taking more than 2 minutes to justify increasing the timeout in the first place… increasing the timeout to make the error go away but yet your customers have a horrible user experience is not a valid solution).
*The ASP.NET MSDN reference indicates that the default setting for the executionTimeout property is 110 seconds: http://msdn.microsoft.com/en-us/library/e1f13641.aspx. But the SharePoint logs show a timeout occurring at exactly 120 seconds with the default executionTimeout setting. I am not sure where the extra 10 seconds are coming from but I used 120 seconds in this article since that is what someone will find when investigating the SharePoint logs.