There are several server configuration settings that factor into supporting large file uploads, and of course, there are external factors such as network reliability and available bandwidth. Other factors include server-side resources such as available memory on the web server and how much traffic or load is being serviced.


The httpRuntime element in Web.config has 2 important settings, maxRequestLength, and executionTimeout. 


maxRequestLength is in kilobytes (kB), so you must set it to a high enough number of KB slightly larger than the maximum file size you would like to support. The example below of 1048576 KB translates to 1 GB
If you google for "kB to MB" Google provides a handy calculator for converting Kilobytes to Megabytes, Gigabytes etc. Note, if you want to support file uploads up to 1 GB then we probably should set the kB slightly higher to accommodate the HTML form posted with the file that also is part of the Request payload.


executionTimeout is in seconds, it determines how much time IIS will allow for completing a web request. It can take a while to upload a large file especially if bandwidth is limited. If the configured number of seconds elapses before the file finishes uploading the request will end with a timeout error. The example below is 3600 seconds which is 60 minutes. 

<system.web >
    <httpRuntime requestValidationMode="2.0" maxRequestLength="1048576" executionTimeout="3600" maxUrlLength="560" maxQueryStringLength="2048" />

Considerations for Integrated Application Pools

When using an Integrated Application pool (as opposed to a "Classic" application pool), there are also the requestFiltering settings in the <system.webServer> section that are needed to support large file uploads. We have an example in comments in the Web.config file that ships with mojoPortal. To use the example, remove the comments from around it and adjust the setting to your requirements. Note, in some environments request filtering may be locked down at a higher level such as from machine.config; un-commenting it in the web.config file in those cases can cause an error.

    <requestLimits maxAllowedContentLength="1073741824"/> <!-- measured in bytes -->

Troubleshooting File Upload Problems

When a file upload fails the user will receive a generic error stating that something went wrong. To see the actual error message, view the System Log by logging in as an Administrator and browsing to Administration > System Log. Usually, uploads will fail because one of the above settings isn't configured in a way which will support the size of the file being uploaded. Example errors are: 

When a file upload fails due to exceeding the httpRuntime maxRequestLength, an error will be logged:
"System.Web.HttpException (0x80004005): Maximum request length exceeded"

Similarly, when a file upload fails due to exceeding the httpRuntime executionTimeout, an error will be logged:
"System.Web.HttpException (0x80004005): Request timed out"

When a file upload fails due to exceeding maxAllowedContentLength, nothing will be logged in the mojoPortal system log. The is because,as noted in the IIS documentation, IIS returns a page not found (404) error when the maxAllowedContentLength is exceed. Because of this, the request never reached mojoPortal code so nothing was logged by mojoPortal.

For problems uploading files from the File Manager or from the WYSIWYG editors (CKeditor, TinyMCE), see also the Storage Quotas section in the article Allowing Users To Upload and Browse Files. File uploads will be blocked in those features once the quotas have been reached.

A hosting environment with low memory available to the site may not handle large file uploads. If you see repeated application start and end events being logged when you try to upload large files, the application pool may be reaching the allowed or available memory when it tries to process the request. Recycling the application pool kills the process handling web requests and can cause failed uploads if it happens while uploading whether the file upload caused it due to the memory limit or whether the application pool is recycled for other reasons (manually for example).

In all cases the IIS web logs are useful when you want to know the result of specific web requests or troubleshoot uploading problems, especially if you don't see any clues in the mojoPortal log about file upload related errors. You should check the status code of the file upload web requests in the IIS web logs, and keep in mind the 404.13 status that IIS will return if the file is larger than the maxAllowedContentLength.

Supporing Old Browser Versions

The Drag and Drop and Multifile Selection is only supported in modern web browsers that support HTML 5. If you are supporting mostly users with older web browsers, you might want to hide the drop zone since it won't work and will only confuse those users. To do this, add the following to the file found in your skin folder:

<portal:jQueryFileUpload runat="server" UseDropZone="false" />

Advanced Configuration

The settings shown above will get the job done as far as enabling large file uploads but allowing large limits on any url could make it easier for denial of service attacks. Therefore it can be desirable to keep lower settings there and make more specific settings that apply only to the urls where we are expecting file uploads. Before we go into how to configure specific urls it would help to know which urls exist in mojoPortal that support file uploads. The following urls are used to upload files in mojoPortal and features that plug into mojoPortal that we know of. Custom features that you make yourself or third party features may have their own urls that need to support file uploads.

the main url used for uploads in the file managers and when uploading files from the wysiwyg editors
handles media attachment uploads for blog posts
handles uploads for the Folder Gallery feature
handles uploads for the Image Gallery feature
handles uploads for the Shared Files feature
handles uploads for the Xml/Xsl feature
handles uploadin product files for the WebStore feature
handles uploads for Form Wizard Pro

Note The above list could change so if you are using the methods below to control upload settings be sure to check this list for changes.

Note If you are supporting legacy browsers like IE 6, our javascript file uploader which normally posts to a service url degrades to the standard <asp:FileInput and in this case the file posts to whatever page the input is on, so it could be on any url where a feature exists that does uploads. For example if you have page with the url /ourfiles and it has an instance of Shared Files feature on it and you have a user that is in a role allowed to upload to the Shared Files instance on that page and he is using IE 6 to do so, then it will not use our javascript uploader but will postback the file to the /ourfiles url along with the rest of the page postback.
Therefore if you need to support user uploading from IE 6 or other legacy browsers then you probably should just use the general settings at top of this page instead of configuring specific urls.

There are 2 ways that you can configure the needed settings for specific urls, using the site web.config  file, using per-folder web.config files.

Site web.config File

Using location elements add the settings to the site's main web.config file within the existing <configuration> element. This example is for the Shared Files feature.

<location path ="SharedFiles/upload.ashx">
    <system.web >
      <httpRuntime requestValidationMode="2.0" maxRequestLength="1048576" executionTimeout="3600" maxUrlLength="560" maxQueryStringLength="2048" />
        <requestLimits maxAllowedContentLength="1073741824"/>

Per-folder web.config Files

Create a web.config file and put it in the folder containing the service needed for the upload. This method has the advantage of less work when you upgrade to a new version of mojoPortal because you would not need to merge your changes with the new web.config file in the upgrade package. We don't ship any web.config files in other folders of mojoPortal or its features so there is no risk of them being overwritten during upgrades. Using the Shared Files feature as our example, the content of the new web.config would be:

<?xml version="1.0" encoding="UTF-8"?>
<location path ="upload.ashx">
<system.web >
  <httpRuntime requestValidationMode="2.0" maxRequestLength="1048576" executionTimeout="3600" maxUrlLength="560" maxQueryStringLength="2048" />
    <requestLimits maxAllowedContentLength="1073741824"/>

Legacy Information for versions of mojoPortal Older than

In version we removed all use of NeatUpload from mojoPortal. The information below applies only to versions of mojoPortal older than that.

There are a number of features in mojoPortal content management system which allow for uploading files, however the maximum file size that can be uploaded depends upon configuration. In addition to the information on this page, file uploads can be limited by available disk space. Some hosting providers give you a certain amount of disk space but you must allocate it to your sites in order for it to be available. So in addition to settings mentioned on this page you may need to look around in your hosting control panel for information about available space and allocation of that space to your site(s).


When running in Full Trust (and using the Web.config file configured for full trust), mojoPortal uses NeatUpload and the file size limits are controlled by the NeatUpload section in Web.config.

Note that we ship 2 versions of Web.config, one is configured for Medium Trust and has NeatUpload disabled, the other is for Full Trust hosting and has NeatUpload enabled. The only difference between the files is whether NeatUpload is enabled. NeatUpload provides a nice progress bar during uploads but it only works in Full Trust hosting. If you see a progress bar when uploading then you are using NeatUpload if you don't then you are not.

<neatUpload xmlns=""

Whereas, when running in Medium Trust NeatUpload is disabled and file upload limits are controlled by the httpRuntime settings like this:

<httpRuntime maxRequestLength="2097151" executionTimeout="3600"  />

Note that executionTimeout is relevant even when you are using NeatUpload


If you use IIS7 you also have to do the following (see discussion at

at an elevated (run as admin) command prompt enter:

%windir%\system32\inetsrv\appcmd set config "MySite/MyApp" -section:requestFiltering -requestLimits.maxAllowedContentLength:104857600 -commitpath:apphost

you can verify that the setting was inserted OK by doing and checking out the output:

%windir%\system32\inetsrv\appcmd list config "MySite/MyApp" -section:requestFiltering

the command is changing the maxAllowedContentLength request limit that IIS7 requestFiltering (the replacement for urlscan) has introduced

NeatUpload documentation also mentions the following alternative regarding the IIS7 issue:

(Optional) To allow larger uploads than the 30MB default used by IIS7, add the following to your Web.config under the configuration/system.webServer/security/requestFiltering section:

 <requestLimits maxAllowedContentLength="size_in_bytes"></requestLimits>


            <requestFiltering><requestLimits maxAllowedContentLength="262144000" /></requestFiltering>

<!-- maxAllowedContentLength is in bytes. Defaults to 30,000,000 -->

Note that for such a change to be allowed, you or your hosting provider might need to change the machine's %SystemRoot%/system32/inetserv/config/applicationHost.config file such that the overrideModeDefault attribute for the requestFiltering section is Allow instead of Deny.

Additional Resources:

Last Modified by Joe Davis on Jan 12, 2018