When uploading file to IIS greater than default will lead to
Exception Details: System.Web.HttpException: Maximum request length exceeded.
To solve this problem, we need specify our upload limit the server is allowed to accept say 5MB (1024×5000)
In Web.config > system.web add
<httpRuntime maxRequestLength="5120000" executionTimeout="3600" />
In Web.config > system.webServer
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="5120000" />
</requestFiltering>
</security>
Note: maxRequestLength and maxAllowedContentLength must match