Share via

IISServerOptions.MaxRequestBodySize Property


Gets or sets the maximum allowed size of any request body in bytes. When set to null, the maximum request length will not be restricted in ASP.NET Core. However, the IIS maxAllowedContentLength will still restrict content length requests (30,000,000 by default). This limit has no effect on upgraded connections which are always unlimited. This can be overridden per-request via IHttpMaxRequestBodySizeFeature.

 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)

Property Value


Defaults to 30,000,000 bytes (~28.6 MB).

Applies to