azure web app maximum request length exceeded

Manigandan K picture Manigandan K · Oct 15, 2018 · Viewed 8k times · Source

We hosted Dot Net Web Application in Azure Web App. There is File Upload and Download provisions available. When we try to upload and download small size files (in KBs), there is no issue. But when the file size is more than MB then Maximum Request Length Exceeded error occurred. We tried with Web.config setting like httpruntime and requestLimits, but error not rectified. It works fine in our local environment. Is there any option to change the request limit in azure web apps.

Answer

Monika Reddy picture Monika Reddy · Mar 13, 2019

If you have setup your web application under Azure Web Application Firewall gateway, you should be able to increase or specify the upload limit by following the below steps. enter image description here

The file upload limit field is specified in MB and it governs the maximum allowed file upload size. This field can have a minimum value of 1 MB and a maximum of 500 MB for Large SKU instances while Medium SKU has a maximum of 100 MB. The default value for file upload limit is 100 MB.

But if you have not setup under Azure Application Gateway Web Application Firewall, then this solution might not be helpful for you.

You can also refer to the below document for more info : https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-waf-configuration