5

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.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Manigandan K
  • 63
  • 1
  • 1
  • 6
  • Same problem here, but we are using azure web app for windows containers. Tried bundling a web.config with the asp.net core application running in the container and its not working. A header on the response reveals its behind IIS but I can't see how to increase this setting. – Darrell Aug 26 '20 at 18:26
  • @Darrell did you found a solution for file upload limit in web app for windows containers? I'm facing the same problem. – tomec Mar 08 '21 at 10:23
  • 1
    @tomec I opened a support ticket and the product team eventually looked into it and rolled out a fix. Their fix increased the current limit to 2gb. I thought this would have been platform wide but perhaps they only deployed it in our tenant. We were using preview at the time. When it reached GA we migrated from preview to GA and hit a tonne of new errors. We since ditched azure app service for Windows containers and went back to VM's. – Darrell Mar 09 '21 at 20:09
  • @tomec after they fixed request size limit for us we hit another limit with query string size. Despite multiple attempts to get them to look at it they wanted a repro and I just didn't have the time to hand hold any longer. Their product team should be able to answer and document what the request limits are, it shouldn't take customers to establish what how their services behave for them... so yeah we left. – Darrell Mar 09 '21 at 20:11
  • @Darell thank you for answer! Yes, maybe we'll migrate to Kubernetes or VM's, let's see. – tomec Mar 10 '21 at 21:05

1 Answers1

0

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://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-waf-configuration

Dharman
  • 30,962
  • 25
  • 85
  • 135
Monika Reddy
  • 943
  • 6
  • 11