• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc
Show / Hide Table of Contents

How to: Increase the Maximum File Size for Upload in DNN Platform.

DNN Version: 09.02.00
12/08/2019 • 2 minutes to read
Contributors  david-poindexter
12/08/2019  • 2 minutes to read  • Contributors  david-poindexter

The maximum file size must be multiples of 1024.

  • 1024 bytes = 1 kilobyte (KB)
  • 1024 KB = 1 megabyte (MB)
  • 1024 MB = 1 gigabyte (GB)

Steps

  1. Access the web.config file.

  2. Update the httpRuntime tag with the maximum file size you want.

    1. Look for the httpRuntime tag.

      The default httpRuntime tag might look as follows:

      
      <httpRuntime targetFramework="4.5" shutdownTimeout="120" executionTimeout="1200" useFullyQualifiedRedirectUrl="true" maxRequestLength="29296" requestLengthDiskThreshold="81920" maxUrlLength="2048" requestPathInvalidCharacters="&lt;,&gt;,*,%,:,\,?" enableVersionHeader="false" requestValidationMode="2.0" fcnMode="Single" />
      
      
    2. Replace the value of maxRequestLength with the maximum file size in KB.

      Note

      maxRequestLength is stored as kilobytes. Example: You can use 2097152 KB (equivalent to 2 GB).

  3. On IIS7+ or on Cloud Services, if you need to upload files that are greater than 28 MB , add a <system.webServer/> node to specify the maxAllowedContentLength for requests.

    Note

    maxAllowedContentLength is stored as bytes. Example: You can use 2147483647 bytes (equivalent to 2 GB).

    Add the following node to your web.config:

    
    <system.webServer>
        <security>
          <requestFiltering>
            <requestLimits maxAllowedContentLength="2147483647" />
          </requestFiltering>
        </security>
    </system.webServer>
    
    
  4. Save the web.config file.

Increase the time available for file Upload

When you increase the Maximum File Size for Upload in DNN Platform to a very high value, you could run into other limitations. There is a maximum time a request can run before it's stopped by .NET As larger files can take a while to upload, you could run into this after you changed the maxRequestLength, especially on slower connections. To increase the Execution Timeout, look for the "executionTimeout" entry in web.config and change it accordingly. This executionTimeout value is stored in seconds.

Error: Login IP Filtering Is Currently DisabledError: Another User Has Taken Action on the PageError: Unknown Server Tag - DNNComboBoxError: Could not load file or assembly 'AWSSDK' or one of its dependenciesError: SQL TimeoutError: ArgumentNullException After a Move or an UpgradeTroubleshooting: Missing Resources After An UpgradeTroubleshooting: Mixed-Content Warnings When Using SSL OffloadingTroubleshooting: Profile Image Not ShownTroubleshooting: Page Remains in Draft ModeTroubleshooting: Unable to Remove Page Redirect URLsTroubleshooting: Site Theme Does Not LoadTroubleshooting: Incomplete Content LocalizationTroubleshooting: Missing Persona Bar
Back to top by the community, for the community... #DNNCMS