HttpRuntimeSection.MaxUrlLength プロパティ

定義

HTTP 要求内の URL の許容される最大長 (文字数) を取得または設定します。

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

プロパティ値

URL の長さ (文字数)。 既定値は 260 です。

属性

注釈

プロパティの MaxUrlLength 値には、0 以上の任意の整数を指定できます。

注意

値が非常に小さいと、Web サイトが使用できなくなる可能性があります。

要求 URL の長さ (プロパティの Path 値) が構成されたサイズ制限を超えた場合、ASP.NET は HTTP 400 (無効な要求) 状態コードを返します

この値は、 要素の 属性を設定することで、構成ファイルでhttpRuntime設定MaxUrlLengthできます。 詳細については、「 httpRuntime 要素 (ASP.NET 設定スキーマ)」を参照してください。

適用対象