KestrelServerLimits Class

Definition

public ref class KestrelServerLimits
public class KestrelServerLimits
type KestrelServerLimits = class
Public Class KestrelServerLimits
Inheritance
KestrelServerLimits

Constructors

KestrelServerLimits()

Properties

Http2

Limits only applicable to HTTP/2 connections.

KeepAliveTimeout

Gets or sets the keep-alive timeout. Defaults to 2 minutes.

MaxConcurrentConnections

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

Defaults to null.

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.

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.

MaxRequestBufferSize

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

MaxRequestHeaderCount

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

MaxRequestHeadersTotalSize

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

MaxRequestLineSize

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

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).

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.

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.

RequestHeadersTimeout

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

Applies to