Compartir a través de


Uploading Large files to SharePoint on Windows Server 2008 and IIS7

If you are trying to upload files to SharePoint and are using Windows Server 2008 with IIS 7, there's one additional step you need to make to your environment other than the typical Large File changes needed.

Basically, any file over 28mb will error out upon uploading. The dreaded "The page cannot be displayed". Ugh.  Luckily, the solution is rather simple (as long as your environment is already configured for large file support… see post: SharePoint Large File Upload Configuration). You need to add another setting to your web.config to support the maximum allowed content length (maximum size of a file that you support).

  1. To change it: navigate to the SharePoint webapplication directory, by default: inetpub\wwwroot\wss\VirtualDirectories\VirtualDirectoryFolder

  2. You need to add the following configuration to your config file:

    <system.webServer><security><requestFiltering><requestLimits maxAllowedContentLength="52428800"/></requestFiltering></security></system.webServer>

    image 
    The length that you add needs to be in bytes, and needs to match the file size that you want to upload. For example, I'm using 158334976 bytes here because in Central Admin I have maximum file upload size set to 150mb. For a utility to convert bytes, see this post .

Make sure that you set this a little larger than what you have configured in SharePoint… that way your users will still get an error message stating that they are exceeding the file size limit.

Happy uploading.

Comments

  • Anonymous
    January 01, 2003
    Shouldn't have to restart anything as a change to web.config restarts the app pool automatically.... however, that being said if it's not taking, then an IIS Reset never hurts. :)

  • Anonymous
    December 09, 2010
    The comment has been removed

  • Anonymous
    February 09, 2011
    Yep, agree. A very informative, easy to follow solution. Very much appreciated.

  • Anonymous
    February 18, 2011
    Worked great thanks.   I pasted your text into the wrong web.config file in one of two virtual directory folders.  I got a 500 Internal server error.  Once I took it out and put it in the correct file, everything worked.  Some of our videos are almost a Gig., and they upload fine.  

  • Anonymous
    May 21, 2011
    The comment has been removed

  • Anonymous
    January 03, 2012
    It's really nice documents. However; still not working in my case. Trying to upload 1.4 GB files to sharepoint 2010 (running on 2008 R2 OS) with a separated SQL 2008 Standard. Any idea? Thanks, Tri

  • Anonymous
    April 05, 2012
    Do I have to restart anything after these changes ? (IIS, etc.) thanks

  • Anonymous
    October 09, 2012
    Now why can't the product team incorporate these changes into SharePoint?!?  If you change the Max File size from 50 MB to 200MB, I would expect SharePoint to make all the necessary changes to accomodate timeouts required to support a 200MB upload whether it be in .Net, IIS, or otherwise.  At the very least on the page where you change the max file size Microsoft should offer a link to a KB article outlining the other dependant settings that are necessary to support larger file sizes.