Increase the DotNetNuke Maximum File Upload Size

I find the default limit on file upload size in DotNetNuke can be too restrictive.

The default DNN upload file size is 8Mb.

The setting is within the web.config file in the root of the DNN website file installation.

Look for the section <system.web>.

    <!-- allow large file uploads -->
    <httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="8192" requestLengthDiskThreshold="8192" />

Increase the value of the maxRequestLength parameter to clear the file size which is an issue. Doubling to 16M may be sufficient.

    <!-- allow large file uploads -->
    <httpRuntime shutdownTimeout="120" executionTimeout="900" useFullyQualifiedRedirectUrl="true" maxRequestLength="16284" requestLengthDiskThreshold="16384" requestValidationMode="2.0" requestPathInvalidCharacters="<,>,*,%,:,\,?" fcnMode="Single" />
    <httpCookies httpOnlyCookies="true" requireSSL="false" domain="" />

To edit the file download a copy from the server via FTP using Filezilla. The file can then be edited with a text editor such as notepad.

For simplicity of editing with colour discrimination of tags and parameters you may find one of the HTML editors useful. Must admit if it’s a one off then whatever editor is to hand is the best option.

At the time you are downloading this one configuration file why not take a backup of the whole website?

With an increased file size capability it will take longer to upload the files to your website. You may also wish to increase this time out.

If you are experiencing file upload restrictions on images then maybe you should reconsider the size or quality of the image which you are uploading. Larger, slow to load images, can have a detrimental effect on your website, visitors maybe become impatient leaving slow to load pages and it is considered a black mark on your SEO score.


DNN Software: Working with large files