Kentico CMS 7.0 Developer's Guide

Configuring maximum uploaded file size

Configuring maximum uploaded file size

Previous topic Next topic Mail us feedback on this topic!  

Configuring maximum uploaded file size

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

The default maximum uploaded file size setting on IIS6/7 is 30MB. To enable uploads of larger files, which is essential for the functionality that the media libraries were designed for, you need to add the following keys to your web.config file:

 

IIS 6

 

All you need to do is to set the value of the following property, which is already present in your web.config, to the desired value, while the value is entered in kiloBytes:

 

<httpRuntime maxRequestLength="2000000" />

 

IIS 7

 

You need to do the same setting as described above for IIS 6. Then, you need to add the following highlighted code to the end of your web.config. The value of the maxAllowedContentLength property is entered in Bytes:

 

...

 

<system.webServer>

<security>

   <requestFiltering>

     <requestLimits maxAllowedContentLength="2147483648"/>

   </requestFiltering>

</security>

 <validation validateIntegratedModeConfiguration="false" />

 <modules>

   <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

   <add name="XHtmlModule" type="CMS.CMSOutputFilter.OutputFilterModule, CMS.OutputFilter" />

 </modules>

 <handlers>

   <remove name="WebServiceHandlerFactory-Integrated" />

   <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

   <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

   <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

 </handlers>

</system.webServer>

</configuration>