Condividi tramite


HttpRuntimeSection.MaxUrlLength Proprietà

Definizione

Ottiene o imposta la lunghezza massima possibile, espressa in numero di caratteri, dell'URL in una richiesta 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

Valore della proprietà

Lunghezza dell'URL, espressa in numero di caratteri. Il valore predefinito è 260.

Attributi

Commenti

Il valore della MaxUrlLength proprietà può essere qualsiasi numero intero, zero o maggiore.

Nota

I valori estremamente piccoli possono rendere inutilizzabile un sito Web.

Se la lunghezza dell'URL della richiesta ,ovvero il valore della Path proprietà, supera il limite di dimensioni configurato, ASP.NET restituisce un codice di stato HTTP 400 (richiesta non valida)

È possibile impostare questo valore in un file di configurazione impostando l'attributo MaxUrlLength dell'elemento httpRuntime . Per altre informazioni, vedere Elemento httpRuntime (schema delle impostazioni di ASP.NET).For more information, see httpRuntime Element (ASP.NET Settings Schema).

Si applica a