IISServerOptions.MaxRequestBodySize 屬性

定義

取得或設定位元組中任何要求主體允許的大小上限。 當設定為 null 時,ASP.NET Core中將不會限制要求長度上限。 不過,根據預設,IIS maxAllowedContentLength 仍會限制內容長度要求 (30,000,000) 。 此限制不會影響一律無限制的升級連線。 這可以透過 IHttpMaxRequestBodySizeFeature 覆寫每個要求。

public:
 property Nullable<long> MaxRequestBodySize { Nullable<long> get(); void set(Nullable<long> value); };
public long? MaxRequestBodySize { get; set; }
member this.MaxRequestBodySize : Nullable<int64> with get, set
Public Property MaxRequestBodySize As Nullable(Of Long)

屬性值

備註

預設為 30,000,000 個位元組, (~28.6 MB) 。

適用於