SharePoint uploads timeout or give error

1

Posted by James | Posted in IIS, SharePoint | Posted on 19-10-2010

Sometimes when uploading to a document library in SharePoint, files will mysteriously time out or else give a cryptic error such as ‘Folder not found’ on Vista or Windows 7. These can occur despite the fact that you’ve changed the maximum upload sizes for SharePoint in Central Administration. The error messages aren’t particularly helpful, to say the least. There are a number of articles out there about changing the IIS connection timeout, etc but they didn’t work for one of our clients. After a bit of digging, we managed to resolve the issue for them – here’s how we fixed it.

One quick way to work out if this fix will solve your problem it to try a few different sized files – if MOSS 2007 bombs out on files over 28mb or thereabouts, you’re probably seeing this issue. Here is the fix, lifted from Microsoft website – note you’ll need the usual IIS reset after you’ve made the changes on all your Web Front End servers:

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:
    Inetpub\wwwroot\wss\VirtualDirectories\VirtualDirectoryFolder
  • 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.

Not too hard now was it? Hope this has helped someone!

Comments (1)

I do not have this setting in my web.config file

Write a comment