Friday, July 15, 2011

List Attachments over 50MB - increase in Maximum Upload Size

I came across problem during my migration project, where there were few mails in Lotus Notes which are having total size 99 MB and one of the attachment was of 65 MB training video.
Problem:
Default SharePoint settings not allow you to upload more than 50 MB file.
Goal:
Increase the maximum upload size for documents and attachments to 60MB for a web application.
Problem Solution:
  1. Open Central Admin
  2. Navigate to Central Admin > Application Management > Web Application General Settings
  3. Select web application for which you want to increase attachment size limit.
  4. Set the Maximum Upload Size value to 100 MB and hit OK.
Results:
  • Upload a 55MB video to a discussion- success.
  • Attach a 55MB file to a list item - receive the classic "An unknown error occurred" message, scratch head ~ that’s now pathetic.
There is a setting at the IIS level that will block list attachment uploads above 50MB. Below 50MB, works fine and is applied directly through web app settings. Above 50MB, you need to make at least one minor tweak to your web.config to allow larger uploads.
Complete solution for max upload sizes over 50MB:
  1. Connect to Central Admin
  2. Navigate to Central Admin > Application Management > Web Application General Settings
  3. Select your web application
  4. Set the Maximum Upload Size value to "X" (in our case its 100) MB and hit OK.
  5. Repeat steps 6-7 for all zones for your web application on all servers hosting the web application role
  6. Open the web.config
  7. Replace the following line:
    <httpRuntime maxRequestLength="51200" />
    with
    <httpRuntime maxRequestLength="{X * 1024}" />
  8. Still if this is not working then add executionTimeout="999999"

         <httpRuntime executionTimeout="999999" maxRequestLength="{X * 1024}" />

If you are using SQL storage for your SharePoint content, the maximum useful value for the maxRequestLength should be 2097152 (2GB in kilobytes = 2 * 1024 * 1024). Other limits may affect large uploads, most notably:
  • Site Collection Quota
  • Timeouts (you may need to adjust these in BOTH Web Application General Settings and the executionTimeout attribute of the <httpRuntime/> element)
    • Timeout settings will be influenced by network throughput limitations like latency and available bandwidth
  • Custom Storage Solution
    • External Blob Storage solution (see WSS SDK v1.3 for this feature that's new to WSS SP1) - whatever max BLOB size applies
  • Disk Space
    • If using SQL Storage, this is the disk containing your data files for your webapp's content DBs
    • If using an External Blob Storage solution, then this is wherever your blob store resides
For more on the httpRuntime web.config element, see http://msdn2.microsoft.com/en-us/library/e1f13641(VS.80).aspx .
Share:

0 comments:

Post a Comment