How to increase the maximum URL length?

What are the best methods I can follow to increase the maximum URL length in IIS7 / ASP.NET?

Please inform.

+6
source share
3 answers

From this site: http://technet.microsoft.com/en-us/library/cc754791(v=ws.10).aspx

Use the command line: appcmd set config / section: requestfiltering / requestlimits.maxurl: unit

This explains how to use appcmd: http://www.windowsnetworking.com/articles_tutorials/Configuring-IIS-7-command-line-Appcmdexe-Part1.html

You need to know where the AppCmd.exe command is located, since it is not in PATH by default. To run AppCmd.exe you will need to change the directory to% windir% \ system32 \ inetsrv \ or add that directory to your PATH variable. On my Windows 2008 server with the default installation, AppCmd.exe was located in C:. \ Windows \ System32 \ Inetsrv

But be careful. If your request URL is really big, use a message to pass parameters

+3
source

Although the HTTP protocol specification does not specify a maximum length, the practical limit is 2083 characters with a maximum length of 2048 characters in the path URL. These are the restrictions that Microsoft Interet Explorer currently applies, which is still used by a large majority of users. A reasonable upper limit on the length of URLs has always been imposed by major web browsers. If you want to submit a form containing many fields that would otherwise create a very long URL, the standard solution should use the POST method, not the GET method:

<form action="myscript.php" method="POST"> ... </form> 

Form fields are then passed as part of the header of the HTTP transaction, and not as part of the URL.

+2
source

You may be limited by the following parameter in web.config:

 <configuration> <system.webServer> <security> <requestFiltering> <requestLimits> </requestLimits> </requestFiltering> </security> </system.webServer> </configuration> 

Refer to: http://www.iis.net/configreference/system.webserver/security/requestfiltering/requestlimits#005

0
source

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


All Articles