Home > SharePoint Administration, SharePoint Problems/Issues > Uploading large files in SharePoint 2007 running IIS7

Uploading large files in SharePoint 2007 running IIS7

When trying to upload large files into SharePoint MOSS 2007 that is running on a Windows Server 2008 box with IIS7 you might encounter time out sessions with a 404 error.

This is because by default IIS7 has a limited upload size of 28MB regardless if you configured SharePoint Configuration to accept larger files.

To fix this problem you need to configure a few extra things.

Increase the max load size limit in SharePoint Central Administration

1.  Log into the SharePoint server and navigate to SharePoint Central Administration -> Application Management -> Web Application General Settings.  Here (if you haven’t done so already) change the max upload size to a size limit needed.
2.  Close out of SharePoint Central Administration.

Increase the connection time-out setting in IIS7

1.  Start -> All Programs -> Administrative Tools -> Internet Information Services (IIS) Manager.
2.  Click the virtual server you want to configure and on the far right under “Actions” click “advanced settings”.  The Advanced settings dialog box will open.
3.  Under “Behavior” expand “Connection Limits” for Connection Time-Outs (seconds) and change the Connection Time-Out.  By default its set to 120 seconds.  Increase it to your desirable limit and click ok.  I tend to increase it to 300 or 400 seconds.

Add the executionTimeout value to web.config for upload.aspx

1.  On the SharePoint server browse to:  c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS
2.  Open up the web.config file using (Notepad).
3.  Look for the following lines of code:
<location path=”upload.aspx”>
<httpRuntime maxRequestLength=”2097151″ />
4.  Add the following code to the <httpRuntime maxRequestLength> tag
<httpRuntime executionTimeout=”999999″ maxRequestLength=”2097151″ />
5.   Your new code should look like this:
<location path=”upload.aspx”>
<httpRuntime executionTimeout=”999999″ maxRequestLength=”2097151″ />
6.  Save the file and close.

Add the executionTimeout Value to web.config for Web Application

1.  On the SharePoint server browse to: c:\Inetpub\wwwroot\wss\VirtualDirectories\VirtualDirectoryFolder.
2.  Open up the web.config file using (Notepad).
3.  Look for the following line of code:
<httpRuntime maxRequestLength=”51200″ />
4.  Replace the line with:
<httpRuntime executionTimeout=”999999″ maxRequestLength=”51200″ />
5.  Scroll all the way down to the end of the web.config file and right above the </configuration> line add this code:
<system.webServer><security><requestFiltering><requestLimits maxAllowedContentLength=”52428800″/></requestFiltering></security></system.webServer>

*note.  You can change the maxAllowedContentLength size to any limit you like but it has to be the same size limit as the file you are trying to upload or larger or there will be errors.  Also try to make the size amount a little larger then what is specificed in SharePoint Central Administration.  This also needs to be entered in as bytes.
*note.  Make sure when you put the last line of code into the web.config file that its all done on one line, no line breaks.  For some reason if its broken down i.e.
<requestLimits maxAllowedContentLength=”52428800″/>

This will throw and error when you browse to the portal.

  1. Patrick Legault
    March 23, 2011 at 10:44 pm

    there is an error on the web.config file.
    The line bellow is wrong

    The line bellow is fixed. there is an error on the keyword requestFiltering above.

    • March 23, 2011 at 11:26 pm

      Thank you for the catch.


  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: