Issues with uploading large documents to a document library To begin with, the Support for Large Files was one of the enhancements made in Windows SharePoint Services SP 1. By default, the maximum size for uploading files is set to 50 MB. The maximum file size that it can go up to is 2,047 megabytes (2 GB). Though SharePoint is meant to handle files that are up to 2 gigs in size, it is not practically feasible and not recommended as well. However, there are circumstances where files of much smaller size fail to upload which makes one wonder as to what could be the reason, and hence this article. Below are the common error messages that you may encounter while trying to upload large files based the operation system and the version of IIS. WSS 3.0 or MOSS on a Windows 2003 server; when we upload any document larger that 50 Mb on any document library, we get an error message as: "An unexpected error has occurred" WSS 3.0 or MOSS on Windows Server 2008 ; when we upload any document larger that 28 Mb on any document library, we get the error message as: "The page cannot be displayed." In some circumstances, we may also get a "HTTP 404 - Page not found" error. This can occur due to various reasons and this post lists a few of the possible causes and the workarounds for them.
WORKAROUND(s)
Increase the maximum upload size in the web.config file of web application The maxAllowedContentLength property specifies the maximum length of content in a request in bytes and it needs to be set on a Windows Server 2008 computer that has IIS 7.0-only installations.
To change the value of the property via web.config, do the following:
Open the web.config file of a web application located in %Inetpub%\Wwwroot\Wss\VirtualDirectories\<Virtual Directory> folder and add the following code at the bottom, just before the close out of the <configuration> section of the Web.config file
<Configuration> .. .. <system.webServer> <Security> <RequestFiltering> <requestLimits maxAllowedContentLength”52428800’/> </requestFiltering> </security> </system.webServer> </configuration>
This sets the value of the maxAllowedContentLength property to 52428800 (in bytes) for the web application only.
To change the value of the property via command-line, do the following:
"12\TEMPLATE\LAYOUTS" folder Open the 'Web.config' file from the 'C:\Program Files\Common Files\Microsoft Shared\Web server extensions\12\TEMPLATE\LAYOUTS' directory. Add the executionTimeout value that you want. For example, replace the value as follows Existing code <location path="upload.aspx"> <system.web> <httpRuntime maxRequestLength="2097151" /> </system.web> </location> Replacement Code <location path="upload.aspx"> <system.web> <httpRuntime executionTimeout="999999" maxRequestLength="2097151" /> </system.web> </location>
Large file support limitations The following features do not support files larger than 50 MB
See Also