Saturday, August 14, 2010

Upload large files to Sharepoint

If you need to increase the maximum file upload size on your SharePoint site the first place you'll probably check is Central Administration. There's a Maximum Upload Size setting right there. The problem is that it doesn't seem to do anything. You still get an error whenever any file over 28MB's is uploaded even if you changed this setting in the web app settings all the way up to 2GB's.  The security built into Windows Server 2008 is at fault here.  When you make the changes in the web app settings they do not get transferred to the web.config file automatically.  So you must manually update the web.config file for all web apps needing this change and update the web.config file in the 12 hive as well. You have to increase the file size limit as well as the time out settings to accommodate for the larger file sizes.

To solve the time out issue open up the web.config and change the executionTimeout of the httpRuntime. Do this for all web apps that need the larger file size.

   1:  <system.web>
   2:     <httpRuntime executionTimeout="999999" maxRequestLength="2000000" />
   3:  </system.web>

Now for the file size:

On a Windows Server 2008 computer with IIS 7.0, you’ll have to add the maxAllowedContentLength value to the web.config.

   1:  <system.webServer>
   2:     <security>
   3:        <requestFiltering>
   4:           <requestLimits maxAllowedContentLength="2000000000"/>
   5:        </requestFiltering>
   6:     </security>
   7:  </system.webServer>

1 comment:

Karthika Shree said...

Great post!I am actually getting ready to across this information,i am very happy to this commands.Also great blog here with all of the valuable information you have.Well done,its a great knowledge.
Sharepoint Training in Chennai