SharePoint Upload Size Limit on Server 2008 – IIS 7

MOSS Upload Size and TImeout Issue
A funny thing happens when you go to central admin and change the web app settings to a higher setting while running MOSS on Server 2008.
It would appear you get an error whenever any file over 28MB’s is uploaded even if you changed this setting in the web app settings all the way up to 2GB’s.  The security built into 2008 is at fault here.  When you make the changes in the web app settings they do not get transfered to the web.config automatically.  So you must manully update the web.config for all web apps needing this change and update the web.config in the 12 hive as well.
In the 12 hive we need this change.  This is the web.config file in the templates gallery.
Change the web config for all web apps that need the change
 This will stop the time out problem.
Now for the file size:
On a Windows Server 2008 computer that has IIS 7.0-only installations, you add the maxAllowedContentLength value. When you are running Windows SharePoint Services on a Windows Server 2008-based computer that has IIS 7.0, you find that you cannot upload files that are larger than 28 MB even though you have configured the large file upload settings. Usually, the error that users see is “The page cannot be displayed.” In some circumstances, users may also see an “HTTP 404” error.To work around this problem, set in the Web.config file for the Web application to have following settings under the <configuration> section:

  • Use Notepad to open the Web application Web.config file. By default, this file is in the following folder:
  • Add the following settings under the <configuration> section of the Web.config file:
    <system.webServer><security><requestFiltering><requestLimits maxAllowedContentLength=”52428800″/></requestFiltering></security></system.webServer>

Note maxAllowedContentLength=”52428800″ in bytes has to match the size of file that you are trying to upload. Also, when you set the number, increase it slightly beyond the maximum file upload size that you have configured in SharePoint. If the number is equal to or less, users will not receive the error message that they are exceeding the size limit if they try to upload a file size larger than that specified by the administrator.

 Place the above code at the botom just before the close out config section like this:

This entry was posted in MOSS Administration. Bookmark the permalink.

9 Responses to SharePoint Upload Size Limit on Server 2008 – IIS 7

  1. Unknown says:

    Don, thanks for this tip. I have been banging my head against the wall. And it sounds like the perfect solution for our issue. However, do you have to add the maxAllowedContentLength in a very specific section? Whenever I add it (and tried in various places), I get a 500 – Internal Server Error.

  2. Don says:

    I added the location in an an image so everyone could see it.

  3. Unknown says:

    Thanks for the blog entry! After trying every other possible setting in IIS, SharePoint, etc, this was the answer!

  4. Ivan says:

    It is the best decision of this problem. Very helpful. Thank you, Don!

  5. Unknown says:

    Hi, does the same fix apply for MOSS 2k7 running on Server 2003? Thanks.

  6. Don says:

    No this is an IIS7 issue so it only relates to Server 2008 at this point.

  7. Unknown says:

    Regarding "In the 12 hive we need this change. This is the web.config file in the templates gallery", which specific files do I need to edit? There are about 20 different subdirectories in the 12 hive.Thank you,Larry

  8. Matt says:

    Is a IIS reset required to make this take effect?

    I am running MOSS on Windows Server 2008 with IIS7.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s