By default, IIS web server allows for limited file size to be uploaded to the web
server. For IIS 5 and IIS 6, the default maximum file upload size is 4 MB. If a
user uploads a file larger than 4MB, they'll get an error message: "Maximum request
length exceeded.".
This tutorial is designed for IIS 5.0 and 6.0. For 7.0 and 8.0, please check here. For Debugging guidelines,
please click here
.
Update web.config of the site to increase the upload limits
In IIS 5.0 and 6.0, The httpRuntime web.config element controls settings
about how ASP.NET processes requests, including maximum request length. It is controlled
by the following attribute:
maxRequestLength
The maximum allowed request length that will be handled, in kilobytes. Defaults
to 4096 (4 MB).
Here is an example with a 2GB request length:
<system.web>
<httpRuntime maxRequestLength="1048576" executionTimeout="100000" />
</system.web>
This allows a file upload of 1 GB and it will time out after 100,000
seconds, or 27.8 hours.
Debug Large File Upload
If you have successfully modified the maxRequestLength attribute but still cannot upload large files, please check the IIS Large File Upload Debugging Guidelines.