Configuring maximal uploaded file size

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

The default maximal 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. Besides this, you also need to add the following highlighted code to the end of your 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>

 

Page url: http://devnet.kentico.com/docs/devguide/index.html?configuring_maximal_upload_file_size.htm