How to increase SharePoint upload limits

Sometimes you will find the need to upload files larger than the default SharePoint limits allow. In this article it is explained not only how to increase the maximum permitted size limits, but also the execution and connection timeout limits, which will need to be increased for large files.

Have you ever seen the following error message?

Unhandled Exception: Microsoft.SharePoint.SPException: The form submission cannot be processed because it exceeded the maximum length allowed by the Web administrator. Please resubmit the form with less data.

Or even this one:

Request timed out.

SharePoint by default limits the uploads to 50 MB, but usually if you want to increase the size limits, the execution and connection timeout limits should also be increased, or there won't be enough time for the upload to finish.

Increase maximum upload size in Central Administration

Start by increasing the maximum upload size in Central Administration:

  • Open Central Administration
  • Go to Application Management
  • Choose Web application general settings, under SharePoint Web Application Management
  • Select the desired web application
  • Change the Maximum Upload Size
  • Click OK to save the new value
Central Administration Maximum Upload Size setting
Central Administration Maximum Upload Size setting

The maximum upload size allowed is 2 GB. However, you will probably run into problems if you try to set it that high.

Increase connection timeout in IIS

Update the connection timeout setting in IIS:

  • Open Internet Information Services (IIS) Manager
  • Open the server and the Web Sites folder
  • Right-click the desired web site and choose Properties
  • Increase the Connection timeout property
  • Click OK to save
IIS Connection Timeout setting
IIS Connection Timeout setting

Update web.config of the site

The next step is to update the web.config of the site. The maximum request length (maximum upload size) and the execution timeout limits have to be edited.

  • Go to the folder of the web site, usually at %DRIVE%\Inetpub\wwwroot\wss\VirtualDirectories\VirtualDirectoryFolder
  • Open the web.config file for editing
  • Find the line which has the element <httpRuntime />
  • Update the maxRequestLength value and add or update the value for executionTimeout
<httpRuntime maxRequestLength="204800" executionTimeout="999999" />
Maximum Request Length and Execution Timeout in web.config
Maximum Request Length and Execution Timeout in web.config

Update default web.config of SharePoint

There is also the need to update the default SharePoint web.config.

  • Go to the folder where the web.config is located, which by default can be found at %DRIVE%\Program Files\Common Files\Microsoft Shared\Web server extensions\12\TEMPLATE\LAYOUTS
  • Open the web.config file for editing
  • Locate the <httpRuntime /> line under <location path="upload.aspx">
  • Add the executionTimeout property
<httpRuntime executionTimeout="999999" maxRequestLength="2097151" />
Execution Timeout in the default SharePoint web.config
Execution Timeout in the default SharePoint web.config
Nuno Freitas
Posted by Nuno Freitas on August 5, 2013

Related articles