2

I would like to see how I can limit the maxRequestLength and maxAllowedContentLength properties in an API that was created using HTTP triggers with Azure functions v3 (using .Net core app 3.1)

I have tried using a web.config file that just got ignored (expected). But I'm not sure what other options can be done. Please note that I'm trying to decrease the default limits not increase them !

Any help would be much appreciated. Thanks!

Hela Chikhaoui
  • 122
  • 2
  • 10
  • Have a look at this [blog](https://alexandrebrisebois.wordpress.com/2015/12/09/troubleshooting-maxallowedcontentlength-exceeded/) –  Feb 16 '22 at 16:04

1 Answers1

0

The HTTP request length is limited to 100 MB (104,857,600 bytes), and the URL length is limited to 4 KB (4,096 bytes). These limits are specified by the httpRuntime element of the runtime's Web.config file.

https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-http-webhook-trigger?tabs=csharp

reference to web.config https://github.com/Azure/azure-functions-host/blob/v3.x/src/WebJobs.Script.WebHost/web.config

NILF
  • 367
  • 2
  • 7