Updated on Kisan Patel
This tutorial will explain you how to increase the maximum request size limit in order to upload large files?
If a user uploads a file larger than 4MB, they’ll get an error message: “Maximum request length exceeded.”
To increase the maximum request size limit so that bigger files can be uploaded on the server, you need to add below code to web.config file:
web.config
<configuration> <system.web> <httpRuntime maxRequestLength="4096" executionTimeout="360"/> </system.web> </configuration>
If you want to increase the file size that can be uploaded on the server; the maxRequestLength
attribute of the httpRuntime
node can be modified in the web.config file. The default is 4MB
ie. maximum of 4 MB file can be uploaded. If we want to increase the file size that can be uploaded, we can increase maxRequestLength value in the web.config file, this value is specified in KB.
Note: For IIS7 and above, you also need to add the lines below:
<system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength="1073741824" /> </requestFiltering> </security> </system.webServer>