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


Version: 2010

Article ID: OT000004

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

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
- System.IO.IOExceptionMessage: The process cannot access the file
- System.IO.IOExceptionMessage: The directory is not empty
- System.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):
  4. <location path="upload.aspx">
  5. <system.web>
  6. <httpRuntime maxRequestLength="2097151" />
  7. </system.web>
  8. </location>
  9. Insert a line immediately after this section (@ line 14), and add the following text:
  10. <location path="copy.asmx">
  11. <system.web>
  12. <httpRuntime executionTimeout="999999" maxRequestLength="2097151" />
  13. </system.web>
  14. </location>
  15. Save and close the web.config file.
  16. Restart IIS.
  17. Once IIS has been restarted, open the Microsoft SharePoint Server 2010 site and verify you can access (or create) the site and applicable library.