Change maximum upload file size in Umbraco

uploads to media section failing?

Posted on Wednesday, April 09, 2014


When uploading files into the "Media" section in Umbraco, you can often find your file is too large and you will get a message such as "Maximum request length exceeded"; the cms user will often just see the red fail in the UI

To increase the size allowed you need to edit the web.config in the root of the web application.

<system.web>
....
<httpRuntime maxRequestLength="32768" executionTimeout="300" />
....
</system.web>

This increases the max upload size to 32MB and increases the timeout.

 

When working with IIS 7+, also requires adding requestFiltering under the system.webServer section:

<system.web>
   
<httpRuntimemaxRequestLength="204800"executionTimeout="99999"/>
</system.web>
<system.webServer>
   
<security>
       
<requestFiltering>
           
<requestLimitsmaxAllowedContentLength="204800000"/>
       
</requestFiltering>
   
</security>
</system.webServer>