If you are making use of document libraries in your companyweb on SBS 2008, you may have noticed that you aren’t able to upload large files (> ~28MB) to a document library. When you attempt, you receive a 404 error in your browser. Additionally, you have tried setting the upload size in SharePoint Central Administration, but you are still encountering the problem.
This behavior is due to certain changes within IIS7. To increase the upload file size limit for your SBS 2008 companyweb, you must edit the web.config file for the companyweb application in addition to increasing the limit in SharePoint Central Administration.
First – set the new limit in SharePoint Central Administration (if you haven’t already):
- Log in to your SBS and navigate to Start | Administrative Tools | SharePoint 3.0 Central Administration
- At the User Access Control prompt, click Continue
- In SharePoint 3.0 Central Administration, navigate to the Application Management tab and click on Web Application General Settings.
- On the Web Application General Settings page, verify that the selected web application is https://remote.domain.com:987.
- If this application is not selected, click on the web application and select Change web application.
- In the Select Web Application window that opens, click to select the SBS SharePoint application.
- In the Maximum Upload Size field, enter the maximum upload size you want to allow.
- Scroll to the bottom of the page and click OK to save the changes.
After setting the increased limit in SharePoint 3.0 Central Administration, you must set the increased value in the companyweb web.config file:
- Open My Computer and navigate to C:\Program Files\Windows Small Business Server\bin\webapp\InternalWebSite
- Right-click on the web.config file and select Properties.
- Go to the Security tab and verify the administrative user you are logged in as has modify permissions on this file. (By default, the administrator account you create during setup will only have read access).
- If necessary, click the Edit button to give your administrative user Modify permissions.
- Click OK to close the file properties.
- Open the web.config file in notepad.
- Scroll to the bottom of the file. Directly above the </Configuration> line, enter the following:
- The maxAllowedContentLength= value listed is in bytes. The value dispayed (52428800) corresponds to 50 MB. I recommend making this value slightly larger than the max upload size you specified in SharePoint 3.0 Central Administration. If this value is equal to or less than the value in SharePoint 3.0 Central Administration, users may not receive the friendly error page indicating they exceeded the file size limit.
- Save the changes to the web.config file.
- Open IIS 7 Administration (Start | Administrative Tools | Internet Information Services (IIS) Manager ).
- Expand <servername>, then expand Sites.
- In the list of sites in the content pane, click to highlight the SBS SharePoint site.
- In the Manage Web Site section of the right-hand pane, click Restart to restart the web site.
</System.Workflow.ComponentModel.WorkflowCompiler> <system.webServer><security><requestFiltering><requestLimits maxAllowedContentLength="52428800" /></requestFiltering></security></system.webServer>
Your users should now be able to upload large files to your companyweb document libraries. However, depending on how large of files users are actually uploading, their uploads may still fail – not due to a size restriction, but rather an IIS timeout issue. To adjust the timeout values for your site, take a look at this post over on Don’s blog.