Increasing the default maximum size for uploaded files in Microsoft Office Server (SharePoint) 2007


Version: 2007

Article ID: OT000003

Increasing the default maximum size for uploaded files in Microsoft Office Server (SharePoint) 2007main image

Description

Microsoft Office Server 2007 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 Office Server 2007, 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 Office Server 2007 is installed, click Start > Programs > Microsoft Office Server > SharePoint 3.0 Central Administration.
  2. From the Central Administration page, click the “Application Management” tab.
  3. Under the “SharePoint Web Application Management” section, click the “Web application general settings” link.
  4. Scroll down to the “Maximum upload size” option.
  5. Change the upload size from 50 Mb to 2047 Mb.
  6. Click “OK” to save the changes.
  7. Close the “Central Administration” page.
  8. 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 “Copy of web.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 112).
  4. Save and close the web.config file.
  1. Browse to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\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 “Copy of web.config” in the same directory.
  2. Edit the original web.config file (NOT the copy) in Notepad.
  3. Locate the following section (@ line 12):
  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 17), 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 Micrsoft Office Server 2007 site and verify you can access (or create) the site and applicable library.