Maximum request length exceeded
Maximum Request Size
Request size refers to the total size of request inlcluding uploaded files or attachments that a web applications allows. By default, a Asp.Net web application supports 4MB of request size or you can say the upload of 4 MB file is allowed at max whenever the size exceeds it throws error Maximum request length exceeded. For solving this error go to your web config and add this
<system.web> <compilation debug="true" targetFramework="4.7.2" /> <httpRuntime targetFramework="4.7.2" maxRequestLength="1048576" /> </system.web>
So, we have to add maxRequestLength attribute on httpRuntime. This line must always be under System.Web tag in web config. In this you can increase the length size to whatever you want. And the entered value is in kb.
<httpRuntime targetFramework="4.7.2" maxRequestLength="1048576" />
Here after adding this in web config, now run your Asp.Net mvc web application . Maximum request length exceeded error should be fixed.