Posted By: Anonymous
I am getting the error Maximum request length exceeded when I am trying to upload a video in my site.
How do I fix this?
If you are using IIS for hosting your application, then the default upload file size is 4MB. To increase it, please use this below section in your
<configuration> <system.web> <httpRuntime maxRequestLength="1048576" /> </system.web> </configuration>
For IIS7 and above, you also need to add the lines below:
<system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength="1073741824" /> </requestFiltering> </security> </system.webServer>
maxRequestLengthis measured in kilobytes
maxAllowedContentLengthis measured in bytes
which is why the values differ in this config example. (Both are equivalent to 1 GB.)