Wednesday, September 23, 2009

Tweaking IIS & web.config connection timeout setting

Microsoft Internet Information Services
If IIS is timing out when you upload large files, you can change "Connection Timeout" property to ensure that larger files can be uploaded successfully.
  1. Go to Start –> All Programs -> Administrative Tools –> Internet Information Services (IIS) Manager.
  2. Right-click the virtual server you want to configure, and then choose Properties.
  3. Click the Web Site tab.
  4. In the Connections section, in the Connection timeout box, type the number of seconds you want IIS to wait before timing out.
  5. Click OK to save settings.
Web.config

There are other settings that you can change in the web.config file that also affect connection timeout.

Update maxRequestLength and executionTimeout attributes belonging to the httpRuntime tag.

executionTimeout = <Time in Seconds>

maxRequestLength = <File size in KB> (by default for ASP.NET applications, its set to 4096 (4MB), but because SharePoint supports 50MB so its set to 51200)

Example:

<!-- 102400 = 100MB -->
<httpRuntime executionTimeout="999999" maxRequestLength="102400" />


No comments:

Post a Comment