Olav Aukan Getting information off the Internet is like taking a drink from a fire hydrant…


Error when uploading large files to SharePoint running on Windows Server 2008

A client was having problems uploading a 29 MB file to their SharePoint server. Internet Explorer would simply show the "This page can not be displayed" error page, so I figured the maximum upload size was probably set too low.  There's two ways to set this limit; through SharePoint Central Administration or with STSADM.

Using SharePoint Central Administration

  1. Click Start -> All Programs -> Administrative Tools -> SharePoint Central Administration
  2. Click Application Management -> Web application general settings
  3. On the Web Application General Settings page, click the Web application that you want to change.
  4. On Maximum upload size, type the maximum file size in megabytes that you want, and then click OK.

You can specify a maximum file size of 2047 MB.


To set the max upload size to 100 MB use the following command:

  1. Click Start -> Run
  2. Type 'cmd' and click OK.
  3. Type 'stsadm -o setproperty -pn max-file-post-size -pv 100 -url http://server' and hit Enter.

However in the client's case the maximum upload size was already set to 100 MB, so clearly this was not the cause of the error. I thought maybe IIS was timing out, but realized that this couldn't be the problem either since the error happened the second the user clicked the Upload button and not 120 seconds later as would be expected with a time out. The default timeout value is 120 seconds, and I confirmed that this had not been changed.

It turns out this is an issue related to Windows Server 2008 when uploading files bigger than 28 MB as described in the bottom of KB925083. The solution is to add the following snippet of XML to the web application's web.config file after the <configSections> tag.

      <requestLimits maxAllowedContentLength="104857600"/>

Replace the actual value with the max upload size for you web application in bytes (1 Megabyte = 1048576 Bytes ).