Windows Server and IIS come preconfigured with file upload limitations you may run into while uploading files to the intranet. For large file uploads, you'd need to update the maxRequestLength and the maxAllowedContentLength attributes in IIS.
The maxRequestLength indicates the maximum file upload size supported by ASP.NET, the maxAllowedContentLength specifies the maximum length of content in a request supported by IIS. Please note that maxRequestLength is in KB whereas maxAllowedContentLength is in Bytes.
Note: Larger files can use up the available hard drive space so we recommend limiting the file sizes allowed to some degree, or using external hosting services for large video files.
Errors commonly encountered are:
- Page cannot be displayed
- 404 File not found
- Check IIS settings for the maxRequestLength and maxAllowedContentLength
To adjust these settings, complete the following on the Web Server.
Step 1. MaxAllowedContentLength: 30 MB limit - IIS 7+
This is used with Multiple File Upload and uploading videos.
- On the web server, execute the following command in command prompt as an administrator to increase the size limit of upload transactions, in this case to 300MB.
C:\Windows\System32\Inetsrv\appcmd set config /section:requestfiltering /requestlimits.maxallowedcontentlength:314572800
Step 2. maxRequestLength limit
Adjust maxRequestLength limit (used with Multiple File Upload and Message Box widgets/fields) as follows:
- Navigate in IIS to the Configuration Editor for the intranet site, if the site URL contains /intranet you'll have to select the intranet folder within the site
- Open System.Web > httpRuntime as shown on the image below
- Look for maxRequestLength and executionTimeout and adjust as necessary (default is typically 4MB)
Note: the maxRequestLength cannot exceed 2097151KB.
- Tap the enter key after updating each value
- Click apply on the right side of your IIS screen
The web server will need enough time to process the request, the example image below uses 10 minutes instead of the default of 1 minute and 50 seconds.
To determine the minimum bytes that you'll need to put into this setting, use the following converter http://www.unitconversion.org/data-storage/megabytes-to-bytes-conversion.html (e.g. if you need 100MB, the value would be: 102400 as shown in the image below)
If you're getting a connection reset error message, you'll also have to increase the Connection Limits timeout in IIS. With the Intranet Web Site selected, click limits in the right menu, and increase connection time-out from 120 seconds.
Connection was reset - Network Configuration
On some networks, there may be an option within the firewall software to set an upload file size limit. If this is set, the user may get some variant of the "Connection Reset" error below (pictured is Internet Explorer). Either remove this setting or set it at a higher value.