The maximum value is max.

Is there any way to set maxUrlLength configuration value in Asp.Net Core? I see how this is done in web.config in earlier versions of the framework, for example:

How to increase maxUrlLength property in config in asp.net MVC 3?

However, this does not work in ASP.Net Core ....

+4
source share
1 answer

You are correct that the maxUrlLength configuration value is not available, not accessible by ASP.net, as it was available in the previous version. The pure reason for this is that the previous version only supports IIS and Windows, so it is tightly integrated with this. Now it is supported by another OS and does it the way they did to collapse the proxy server with the actual server. Like Windows IIS and Linux NGinx.

  • IIS Kestrel.
  • NGIx Kestrel.

URL-, , IIS NGinx.

Windows, " " Web.config. ( NGInx)

- .

<system.webServer>
    <!--   Here you have other settings related to handlers.-->
   <security>
      <requestFiltering>
         <requestLimits maxAllowedContentLength="3000000" maxUrl="10241" maxQueryString="20481" />
      </requestFiltering>
   </security>
 </system.webServer>
+6

Source: https://habr.com/ru/post/1651843/


All Articles