18

I have a web.config with the following lines:

 <requestFiltering>
     <requestLimits maxUrl="25000" maxQueryString="25000"></requestLimits>
 </requestFiltering>

This lets me access urls up to 25k characters including query string. However, when I publish to an Azure website it completely disregards this specific part of my web.config, but I can't find any kind of limits published by Microsoft.

Anyone know what's going on?

Eric
  • 3,284
  • 1
  • 28
  • 29
  • same, despite: https://feedback.azure.com/forums/34192--general-feedback/suggestions/35379964-please-provide-a-way-to-increase-maximum-url-lengt – baHI May 13 '20 at 18:10

3 Answers3

0

You can find the detailed overview of Request Limits in this Azure doc

This can be happening either due to ASP.NET Runtime or IIS Requests Filtering module. By default, the maximum allowed length for a query string is 2048 ref: link and Internet Explorer You should set the appropriate values in your Web.config, under the requestLimits subnodes.

Even if you set a big value for maximum query string, there is a limit for each browser which is handling the url and the query string. This not available in IIS 6 or in IIS 7 app pools running in classic mode.

KarthikBhyresh-MT
  • 4,560
  • 2
  • 5
  • 12
0

Couldn't find any documentation, but Azure App Services seems to have query string limitation set at 2048, which is the recommended default.

The reason your web.config configuration is not working is because it is applied at the worker level and this limit is probably being enforced (also) at the Front-End level, which is the reverse proxy component receiving requests and distributing them to the appropriate backend workers.

afaik there is no way to configure this setting at the front-end level. If you wish to send more data to your application consider using a POST request.

ardoRic
  • 71
  • 1
0

For older servers you had to set the value higher up in the config, it may be worth experimenting with also setting this.

<configuration>
  <system.web>
    <httpRuntime maxQueryStringLength="25000" />
  </system.web>
</configuration>
John
  • 29,788
  • 18
  • 89
  • 130