HttpRuntimeSection.MaxUrlLength Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the maximum possible length, in number of characters, of the URL in an HTTP request.
public:
property int MaxUrlLength { int get(); void set(int value); };
[System.Configuration.ConfigurationProperty("maxUrlLength", DefaultValue=260)]
[System.Configuration.IntegerValidator(MinValue=0)]
public int MaxUrlLength { get; set; }
[<System.Configuration.ConfigurationProperty("maxUrlLength", DefaultValue=260)>]
[<System.Configuration.IntegerValidator(MinValue=0)>]
member this.MaxUrlLength : int with get, set
Public Property MaxUrlLength As Integer
Property Value
The length of the URL, in number of characters. The default is 260.
- Attributes
Remarks
The value of the MaxUrlLength property can be any integer, zero or greater.
Note
Extremely small values can make a Web site unusable.
If the length of the request URL (which is the value of the Path property) exceeds the configured size limit, ASP.NET returns an HTTP 400 (Bad Request) status code
You can set this value in a configuration file by setting the MaxUrlLength attribute of the httpRuntime
element. For more information, see httpRuntime Element (ASP.NET Settings Schema).
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om