Sunday, August 7, 2011

SharePoint 2007 File Upload Sizes

Just a quick post tonight. I was working on an issue where a file upload would not complete to a SharePoint server across the internet over HTTPS. I checked all the usual SharePoint settings and everything looked fine. Yet I was still getting blank pages and 404.13 errors. I was stumped until I started digging into IIS configuration. The problem was due to configuration parameters in Server 2008 with IIS7. The parameter in question was maxAllowedContentLength.

In SharePoint 2007 there are multiple configuration changes required to increase the file upload size. There are also client changes that need to be made if you're concerned about Explorer view.

First, I'd suggest following Microsoft KB article: http://support.microsoft.com/kb/925083. This will get you most of the way there.

The next step is to run the following command on your SharePoint frontend servers. Make sure you run this command as an administrator or it will not succeed.

%windir%\system32\inetsrv\appcmd.exe set config -section:requestFiltering -requestLimits.maxAllowedContentLength:104857600

The 104857600 is 100MB in bytes. Make sure to modify this for what is appropriate to your environment. Just remember SharePoint has a maximum file size hard limit of 2047MB.

Above I mentioned Explorer view, which is powered by WebDAV. From Windows XP and up you'll have to modify a registry key on the client to override the default value for allowed file sizes. The default is about 5MB which is extremely tiny in today's world. Open up regedit and modify the following value in the registry. Create it as a DWORD if it does not exist.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters\FileSizeLimitInBytes

As the name suggests the value is in bytes. I suggest setting this to the maximum upload size that you use for SharePoint. If you only use this for SharePoint, just remember there is no point in setting it higher than 2047MB (or 2146435072 bytes) as SharePoint cannot work with files larger than that.

Once you have all these settings set you should be able to upload larger files to SharePoint. Enjoy!

No comments:

Post a Comment