Table of Contents

Class KestrelLimits

Namespace
AdvanceFileUpload.API
Assembly
AdvanceFileUpload.API.dll

Describes the server-wide limits for connections and requests. Controls settings such as timeouts, maximum sizes, and data rates.

public class KestrelLimits
Inheritance
KestrelLimits
Inherited Members

Properties

AllowSynchronousIO

Gets or sets a value that controls whether synchronous IO is allowed for the Request and Response

public bool AllowSynchronousIO { get; set; }

Property Value

bool

KeepAliveTimeout

Gets or sets the keep-alive timeout. Defaults to 130 seconds.

public TimeSpan KeepAliveTimeout { get; set; }

Property Value

TimeSpan

MaxConcurrentConnections

Gets or sets the maximum number of open connections. When set to null, the number of connections is unlimited.

Defaults to null.

public int? MaxConcurrentConnections { get; set; }

Property Value

int?

MaxConcurrentUpgradedConnections

Gets or sets the maximum number of open, upgraded connections. When set to null, the number of upgraded connections is unlimited. An upgraded connection is one that has been switched from HTTP to another protocol, such as WebSockets.

Defaults to null.

public int? MaxConcurrentUpgradedConnections { get; set; }

Property Value

int?

MaxRequestBodySize

Gets or sets the maximum allowed size of any request body in bytes. When set to null, the maximum request body size is unlimited. This limit has no effect on upgraded connections which are always unlimited. This can be overridden per-request via IHttpMaxRequestBodySizeFeature. Defaults to 30,000,000 bytes, which is approximately 28.6MB.

public long MaxRequestBodySize { get; set; }

Property Value

long

MaxRequestBufferSize

Gets or sets the maximum size of the request buffer. Defaults to 1,048,576 bytes (1 MB).

public long? MaxRequestBufferSize { get; set; }

Property Value

long?

MaxRequestHeaderCount

Gets or sets the maximum allowed number of headers per HTTP request. Defaults to 100.

public int MaxRequestHeaderCount { get; set; }

Property Value

int

MaxRequestHeadersTotalSize

Gets or sets the maximum allowed size for the HTTP request headers. Defaults to 32,768 bytes (32 KB).

public int MaxRequestHeadersTotalSize { get; set; }

Property Value

int

MaxRequestLineSize

Gets or sets the maximum allowed size for the HTTP request line. Defaults to 8,192 bytes (8 KB).

public int MaxRequestLineSize { get; set; }

Property Value

int

MaxResponseBufferSize

Gets or sets the maximum size of the response buffer before write calls begin to block or return tasks that don't complete until the buffer size drops below the configured limit. Defaults to 65,536 bytes (64 KB).

public long? MaxResponseBufferSize { get; set; }

Property Value

long?

MinRequestBodyDataRate

Gets or sets the request body minimum data rate in bytes/second. Setting this property to null indicates no minimum data rate should be enforced. This limit has no effect on upgraded connections which are always unlimited. This can be overridden per-request via IHttpMinRequestBodyDataRateFeature. Defaults to 240 bytes/second with a 5 second grace period.

public double? MinRequestBodyDataRate { get; set; }

Property Value

double?

MinRequestBodyDataRatePeriod

The grace period for the minimum request body data rate.
Default is 15 seconds.

public TimeSpan? MinRequestBodyDataRatePeriod { get; set; }

Property Value

TimeSpan?

MinResponseDataRate

Gets or sets the response minimum data rate in bytes/second. Setting this property to null indicates no minimum data rate should be enforced. This limit has no effect on upgraded connections which are always unlimited. This can be overridden per-request via IHttpMinResponseDataRateFeature.

Defaults to 240 bytes/second with a 5 second grace period.

public double? MinResponseDataRate { get; set; }

Property Value

double?

MinResponseDataRatePeriod

The grace period for the minimum response data rate.
Default is 15 seconds.

public TimeSpan? MinResponseDataRatePeriod { get; set; }

Property Value

TimeSpan?

RequestHeadersTimeout

Gets or sets the maximum amount of time the server will spend receiving request headers. Defaults to 30 seconds.

public TimeSpan RequestHeadersTimeout { get; set; }

Property Value

TimeSpan