Monday, October 18, 2010

SharePoint users can no longer upload files larger than 25 MB after moving from Windows Server 2003 to 2008

I can’t take credit for this one, but it is worth a post.

Problem:

After moving SharePoint from Windows Server 2003 to Server 2008, users can no longer upload files larger than 25 MB. 

Explanation:

This is by design.  SharePoint, by default, restricts file uploads greater than 50 MB.  But IIS 7, by default, restricts file uploads greater than 25 MB.  When this threshold is reached the user gets a 404.13 error.  Of course since all users have "friendly" errors turned on, it is hard to tell why the file didn't upload.  One user even got a Google "Oops" page.

Solution:

Edit the web.config file for each virtual directory and force the threshold to be a little bigger than SharePoint's threshold.  If the threshold is hit, you want the SharePoint error to appear and not IIS's error.

   1: Replace:
   2: <system.net>
   3: <defaultProxy>
   4: <proxy autoDetect="true" />
   5: </defaultProxy>
   6: </system.net>
   7: </configuration>
   8:  
   9: With:
  10: <system.net>
  11: <defaultProxy>
  12: <proxy autoDetect="true" />
  13: </defaultProxy>
  14: </system.net>
  15: <system.webServer>
  16: <security>
  17: <requestFiltering>
  18: <requestLimits maxAllowedContentLength="52428800"/>
  19: </requestFiltering>
  20: </security>
  21: </system.webServer>
  22: </configuration>

The change is instant.  No closing of the browser or restarting of anything is needed.

KB Resource:

http://support.microsoft.com/kb/944981

1 comment:

digital signatures said...

You saved me a day.I was not knowing that this is by design that SharePoint, by default, restricts file uploads greater than 50 MB.I was scratching my head to find a solution and here i found.