Server OS: Windows 2008 SP2
Application: Sharepoint 2007 with SP2
When upload file bigger than 28M to Document Library. IE may have one of the following errors:
“Request timed out” or “HTTP 404″
The result is file failed to upload.
The solution:
Note: This solution is to complete Microsoft KB 925083 (until they can perfect it, also the article is for Sharepoint Services, the central admin part is different on MOSS 2007)
The default Maximum Upload Size in Sharepoint 2007 is 50M, and there’s a reason for it.
Microsoft internal setting is set to 100M.
Theoretically, the size can be 2G. Which is the maximum size SQL can handle.
Solution 1: Ask your user to shrink the files they wanted to upload (eg. powerpoint files that contains high resolution pictures), or split the file to files smaller than 50M, if possible.
Solution 2: (take a deep breath)
Find out what’s the absolute maximum file size you need. Eg: let’s say 150M
Find out what’s the maximum time it will take, from your slowest satellite office that need to upload this 150M file to Sharepoint server (via ftp). In my case, it’s 2 hours…
(Note: A solution has been found for the extrem slow upload, see my post: It takes a long time to upload big files to Sharepoint Document Library via WAN)
- Launch Sharepoint 3.0 Central Administration, go to “Application Management” -> Under “Sharepoint Web Application Management” section -> click on “Web application general settings”
- In “Maximum Upload Size”, change the default “50″MB to “150″MB, or your maximum file size.
- Scroll down, in “Web Page Security Validation” section, change “Security validation expires After” from 30 minutes to 120 minutes, or to your maximum time to complete the upload. (Note: if this setting isn’t changed, you may get following error when try to upload: “The security validation for this page has timed out. Click Back in your Web browser, refresh the page, and try your operation again.” You can already see by increasing this value increases your security risk of been session hijacked)
- Launch ”Internet Information Service (IIS) Manager” on each front end servers, expand IIS server node -> expand Sites -> Find the site that’s hosting your Sharepoint site and right click on it -> choose “Manage Web Site” -> choose “Advanced Settings” -> under “Behavior” expand “Connection Limites” -> change “Connection Time-out (seconds)” from 120 seconds to 7200 seconds.
- On each front end servers, go to “Program Files\Common Files\Microsoft Shared\Web server extensions\12\TEMPLATE\LAYOUTS” folder, make a copy of “web.config” file, then open the file with NotePad, look for following section:
- <location path=”upload.aspx”>
<system.web>
<httpRuntime maxRequestLength=”2097151″ />
</system.web>
</location> - replace it with:
- <location path=”upload.aspx”>
<system.web>
<httpRuntime executionTimeout=”999999″ maxRequestLength=”2097151″ />
</system.web>
</location> - save the files.
- <location path=”upload.aspx”>
- On each front end servers, go to “Inetpub\wwwroot\wss\VirtualDirectories\VirtualDirectoryFolder”:
- make a copy of “web.config” file, then open the file with NotePad, look for following line:
- <httpRuntime maxRequestLength=”51200″ />
- replace the line with:
- <httpRuntime executionTimeout=”999999″ maxRequestLength=”51200″ />
- Go to very end of the file, right in front of “</configuration>” add following:
- <system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength=”157286400″/>
</requestFiltering>
</security>
</system.webServer> - Note: 157286400=150MB * 1024 *1024. Also if you do not put above code right in front of “</configuration>”, but right below “<configuration>” as from the KB, you will get following error:
- Server Error
500 – Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
- On each front end server, run “Command Prompt” as administrator, then run “iisreset”
There are multiple places has file size and timeout restriction, some of the behaviors are Windows 2008 IIS7 specific (such as the 28M restriction discussed in 942074)
As you can see, changing these value may enable upload bigger files in Sharepoint. However, from the user prospective, when they upload a big file from IE, there’s no progress bar indicating the percentage of the upload, and it may take a very long time to upload the file. Users may generally lost patience and click on “OK” button, which only triggers re-upload the same file.
Consider only change these settings when all your users are connected to Sharepoint servers via high speed low latency connections.
No comments:
Post a Comment