Export (0) Print
Expand All

HttpRuntimeSection.MaxUrlLength Property

Gets or sets the maximum possible length, in number of characters, of the URL in an HTTP request.

Namespace:  System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

'Declaration
<IntegerValidatorAttribute(MinValue := )> _
<ConfigurationPropertyAttribute("maxUrlLength", DefaultValue := )> _
Public Property MaxUrlLength As Integer

Property Value

Type: System.Int32
The length of the URL, in number of characters. The default is 260.

The value of the MaxUrlLength property can be any integer, zero or larger.

NoteNote

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).

.NET Framework

Supported in: 4.5, 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft