Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase the max length of url?

Tags:

asp.net

iis-7

What are the best practices that I can follow to increase the max length of the URL in IIS7/ASP.NET?

Please advise.

like image 570
nimi Avatar asked May 29 '12 10:05

nimi


People also ask

Is there a maximum length for a URL?

The official documentation specifies a maximum length of 2048 characters for the <loc> element, which is used to submit URLs: URL of the page. This URL must begin with the protocol (e.g. “http”) and end with a trailing slash if required by the web server. This value must not exceed 2,048 characters.

What is the maximum length of a URL in different browsers?

Short answer - de facto limit of 2000 characters If you keep URLs under 2000 characters, they'll work in virtually any combination of client and server software.

What is the maximum length of query string in URL?

Although officially there is no limit specified by RFC 2616, many security protocols and recommendations state that maxQueryStrings on a server should be set to a maximum character limit of 1024. While the entire URL, including the querystring, should be set to a max of 2048 characters.

How do I find the URL length?

A URL length checker is a tool that allows you to view the number of characters in a URL. By doing this, you can see whether it meets the URL length limit of search engines and make necessary changes for better website optimization. Most search engines allow a max URL text length of 2,000-2,500 characters.

How long can a URL be in bytes?

It is generally accepted that URL lengths should not exceed 255 bytes, as older implementations may not be able to accept longer lengths.


1 Answers

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

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

Here is explained 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 as it is not in the default PATH. In order to run AppCmd.exe, you will either need to change directory into %windir%\system32\inetsrv\ or add that directory to your PATH variable. On my Windows 2008 server with a default installation, AppCmd.exe was located in C:\Windows\System32\inetsrv.

But be careful. If your request url became realy realy large, use post message to pass parameters

like image 146
Sarrus Avatar answered Sep 28 '22 08:09

Sarrus