So you deployed your brand-new ASP.NET web application to Azure cloud. All seems to be working perfectly until a user tried to upload large amount of data (approx. over 30MB) through your application UI. Unfortunately the operation failed. Surprisingly small file uploads works just fine.
To fix the problem you need to ensure that following configuration are made in the web.config file.
<httpRuntime maxRequestLength=”102400″ executionTimeout=”3600″ />
Here value of maxRequestLength is in KB so that makes it 100MB. Having a bigger executionTimeOut value ensures that the file upload operation is not terminated prematurely by the web server.
<requestLimits maxAllowedContentLength=”1024000000″ />
Here the value of maxAllowedContentLength is in bytes so that makes it 100MB again.
Restart the website and large data uploads should work just fine.