Share via


HttpRuntimeSection.MaxUrlLength Propiedad

Definición

Obtiene o establece la mayor longitud posible, en número de caracteres, de una dirección URL en una solicitud HTTP.

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

Valor de propiedad

Int32

Longitud de la dirección URL, en número de caracteres. El valor predeterminado es 260.

Atributos

Comentarios

El valor de la MaxUrlLength propiedad puede ser cualquier entero, cero o mayor.

Nota

Los valores extremadamente pequeños pueden hacer que un sitio web no se pueda usar.

Si la longitud de la dirección URL de la solicitud (que es el valor de la Path propiedad) supera el límite de tamaño configurado, ASP.NET devuelve un código de estado HTTP 400 (solicitud incorrecta).

Puede establecer este valor en un archivo de configuración estableciendo el MaxUrlLength atributo del httpRuntime elemento . Para obtener más información, vea elemento httpRuntime (ASP.NET Configuración Schema).

Se aplica a