Showing posts with label Sharepoint 2010 Upload Size Limit. Show all posts
Showing posts with label Sharepoint 2010 Upload Size Limit. Show all posts

Thursday, October 17, 2013

Maximum request length exceeded error while uploading files of size more than 50MB

Recently one of our SharePoint users came up with an issue that they were not able to upload files to SharePoint. It was giving him an access denied message. I checked for the permission for the user and the user had contribute permissions. The access denied message appeared only when the file size was more than 50 MB. The user was able to upload files of size lesser than 50 MB.

I checked in Central Administration ->Application Management-> Manage web application- >Select web application -> General Settings ->Maximum Upload Size .It was 200 MB

I checked the event viewer on the SharePoint server and saw the below error.

Request Url : 'https://servername/sites/sitename/_layouts/UploadEx.aspx?List={0CB029E1-5FA0-427D-A871-652E1748D8FD}&RootFolder=&IsDlg=1'
Maximum request length exceeded.
Exception Type: System.Web.HttpException
Exception Source: System.Web @ GetEntireRawContent

Resolution

I checked the web.config file of the associated web application and I noticed this.

<system.web>
<securityPolicy>
<trustLevel name="WSS_Medium" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\config\wss_mediumtrust.config"/>
<trustLevel name="WSS_Minimal" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\config\wss_minimaltrust.config"/>
</securityPolicy>
<httpHandlers/>
<customErrors mode="On"/>
<httpRuntime maxRequestLength="51200"/>


If you see this the maxRequestLength parameter for httpRuntime was set to 50 MB. Please note that the value listed here is in kB. I changed this to a higher value (204800 to match the 200 MB in Central Administration).

<httpRuntime maxRequestLength="204800"/>

Tuesday, December 4, 2012

Sharepoint 2010 Upload Size Limit - IIS7 and Windows Server2008


In Sharepoint 2010, though you increase the file upload limits from Central Administration (to more than 50 MB), you wouldn’t be able to upload files more than 28MB. You would get an error whenever you try to upload a file of size greater than 28MB.It is the default IIS configurations that is giving these errors. When you are running Windows SharePoint Services on a Windows Server 2008-based computer that has IIS 7.0, you would not be able to upload files that are larger than 28MB even though you have configured the large file upload settings.
We will have to manually change some values in IIS to fix this issue.

By default these are the values for upload limit in
SharePoint Server 2010: 50 MB
IIS 7: 30 MB

Follow the below steps to fix this issue:

1) Increase the SharePoint Item Upload Limit from Central Administration

Browse to Central Administration -> Manage Web Applications ->Select web application -> General Settings -> Change the Maximum upload size -> Click OK


2) Increase the IIS 7 request limits

Navigate to IIS Manager -> Select the local host -> Choose Request Filtering -> Edit Feature Settings -> Change the value for Maximum allowed content length(Bytes)




3) Increase the IIS7 connection timeout length (optional)

If you need to upload large files, there are chances that the connection times out depending on your internet speed. If you want, you can increase the connection timeout to a larger value. The standard is 120 seconds. If you have users with low speed internet connections, increase this value.

Navigate to IIS Manager -> Select the Web Application -> Manage Web Site -> Advanced Settings ->Expand Connection Limits ->Change Connection Time-out (seconds)