Increasing the default maximum size for uploaded files in Microsoft SharePoint Server 2010

Description


Microsoft SharePoint Server 2010 has a default maximum size limit of 50 Mb for uploaded files. If you try to upload files larger than 50 Mb using either PaperVision SharePoint Tools or PaperVision Capture, you may receive one or more of the following errors:

  • Not enough memory. ErrCode: -4500
  • SendFailure Response: NULL Message: The underlying connection was closed
  • IO.IOExceptionMessage: The process cannot access the file
  • IO.IOExceptionMessage: The directory is not empty
  • OutofMemoryExceptionMessage: Exception of type ‘System.OutofMemoryException’

Summary


To ensure that the above errors are not returned when uploading files to Microsoft SharePoint Server 2010, the maximum file size needs to be increased. The following steps will allow you to increase the default upload size from 50 Mb to 2047 Mb (2 Gb) which is the maximum size allowed for files uploaded.

Steps to Resolve:

  1. From the machine where Microsoft SharePoint Server 2010 is installed, click Start > All Programs > Microsoft SharePoint 2010 Products > SharePoint 2010 Central Administration.
  2. From the section “Application Management”, click the "Manage web applications" link.
  3. Highlight your SharePoint server site (e.g. SharePoint - 80), then from the toolbar, click "General Settings".
  4. From the Web Application General Settings page, change the option "Maximum upload size" from 50 Mb to 2047 Mb.  (This option is located towards the bottom of the screen).  Once you have changed the option, click the <OK> button to save your changes.  Close the Central Administration web page.
  5. Browse to C:\inetpub\wwwroot\wss\VirtualDirectories\80\.
  1. Create a copy of the web.config file (before proceeding to the next step).  To create a copy, highlight the web.config file, right-click and select Copy, then Paste.  This will create a file named web-Copy.config in the same directory.
  2. Edit the original web.config file (NOT the copy) in Notepad.
  3. Find and edit the line that currently reads "<httpRuntime maxRequestLength="512000" />" so that it reads "<httpRuntime maxRequestLength="2097151" />".  (This line is located on @ line 359).
  4. Save and close the web.config file.
  1. Browse to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\.
  1. Create a copy of the web.config file (before proceeding to the next step).  To create a copy, highlight the web.config file, right-click and select Copy, then Paste.  This will create a file named web-Copy.config in the same directory.
  2. Edit the original web.config file (NOT the copy) in Notepad.
  3. Locate the following section (@ line 9):
    1. <location path="upload.aspx">
    2. <system.web>
    3. <httpRuntime maxRequestLength="2097151" />
    4. </system.web>
    5. </location>
  4. Insert a line immediately after this section (@ line 14), and add the following text:
    1. <location path="copy.asmx">
    2. <system.web>
    3. <httpRuntime executionTimeout="999999" maxRequestLength="2097151" />
    4. </system.web>
    5. </location>
  5. Save and close the web.config file.
  6. Restart IIS.
  7. Once IIS has been restarted, open the Microsoft SharePoint Server 2010 site and verify you can access (or create) the site and applicable library.

Filed under Technical Tips

Last modified October 13, 2017

Submitted Jun 29, 2011

Related Articles

Share via Email Print