Skip to main content

SharePoint Upload Size Limit on Server 2008 – IIS 7


MOSS Upload Size and TImeout Issue
A funny thing happens when you go to central admin and change the web app settings to a higher setting while running MOSS on Server 2008.
It would appear you 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 2008 is at fault here.  When you make the changes in the web app settings they do not get transfered to the web.config automatically.  So you must manully update the web.config for all web apps needing this change and update the web.config in the 12 hive as well.
In the 12 hive we need this change.  This is the web.config file in the templates gallery.
Change the web config for all web apps that need the change
 This will stop the time out problem.
Now for the file size:
On a Windows Server 2008 computer that has IIS 7.0-only installations, you add the maxAllowedContentLength value. When you are running Windows SharePoint Services on a Windows Server 2008-based computer that has IIS 7.0, you find that you cannot upload files that are larger than 28 MB even though you have configured the large file upload settings. Usually, the error that users see is “The page cannot be displayed.” In some circumstances, users may also see an “HTTP 404″ error.To work around this problem, set in the Web.config file for the Web application to have following settings under the section:
  • Use Notepad to open the Web application Web.config file. By default, this file is in the following folder:
    Inetpub\wwwroot\wss\VirtualDirectories\VirtualDirectoryFolder
  • Add the following settings under the  section of the Web.config file:
Note maxAllowedContentLength=”52428800″ in bytes has to match the size of file that you are trying to upload. Also, when you set the number, increase it slightly beyond the maximum file upload size that you have configured in SharePoint. If the number is equal to or less, users will not receive the error message that they are exceeding the size limit if they try to upload a file size larger than that specified by the administrator.
 Place the above code at the botom just before the close out config section like this:
 

Popular posts from this blog

How to deal with SharePoint 2010 exception "An exception occurred when trying to issue security token: The server was unable to process the request due to an internal error"

Scenario: You receive the below exception when you try to logon to a site that has been configured to use Claims Based Authentication with a custom membership provider using FBA credentials: Event ID from Event Log  - 8306 An exception occurred when trying to issue security token: The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.. Explanation: This error started to appear in our QA environment which does not have Visual Studio installed. I have tried starting the service "Claims to Windows Token Service" but that did not help either. I have made sure that all config...

Cascading drop down column in a SharePoint List

This article will show how to use codeplex project to achieve Cascading drop down columns in SharePoint list. This article will show how to achieve parent child relationship in column of SharePoint list.   Objective This article will show how to use codeplex project to achieve Cascading drop down columns in SharePoint list. This article will show how to achieve parent child relationship in column of SharePoint list. Step 1 Download the project from codeplex . Choose WSP file to download. To download the project Click here Step 2 After downloading the WSP add the solution using STSADM command. Navigate to BIN folder and add the solution. Command C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\BIN> stsa dm -o addsolution -filename c:\Stoneshare.CascadingDropDown.WithFilter.wsp Step 3 Open Central ADMIN and deploy solution. Navigate to Operation -> Global Configuration -> Solution Management. Select the Global Deployment option. St...

Programmatically adding documents to a document set sharepoint 2010

In continuation with the previous post about  how to create a document sets programmatically , here i will post a little code snippet for adding a document to this document set that we just created in our previous post. For this example i am adding a file to our custom document set which already exists on SharePoint server. You can however, use the file upload control to browse and add a file to your docuemntset. void addDocumentToDocuemntSet() { // Get the existing file SPFile spfile = web.GetFile(“http://SPSite:8080/Lists/DemoLib/abc.txt”); byte[] documentBytes = new byte[spfile.TotalLength]; if (spfile.Exists) { FileStream fs = new FileInfo(spfile.url).OpenRead() fs.Read(documentBytes, 0, (int)fi.Length); //add the default document to your document set template newDocumentSetTemplate.DefaultDocuments.Add(spfile.Name, web.ContentTypes["Document"].Id, documentBytes); } how to create a document sets programmatically