KestrelServerOptions KestrelServerOptions KestrelServerOptions Class

Definition

Provides programmatic configuration of Kestrel-specific features.

public class KestrelServerOptions
type KestrelServerOptions = class
Public Class KestrelServerOptions
Inheritance
KestrelServerOptionsKestrelServerOptionsKestrelServerOptions

Constructors

KestrelServerOptions() KestrelServerOptions() KestrelServerOptions()

Properties

AddServerHeader AddServerHeader AddServerHeader

Gets or sets whether the Server header should be included in each response.

ApplicationServices ApplicationServices ApplicationServices

Enables the UseKestrel options callback to resolve and use services registered by the application during startup. Typically initialized by UseKestrel(IWebHostBuilder, Action<KestrelServerOptions>).

ConnectionFilter ConnectionFilter ConnectionFilter

Gets or sets an IConnectionFilter that allows each connection Stream to be intercepted and transformed. Configured by the UseHttps() and UseConnectionLogging(KestrelServerOptions) extension methods.

Limits Limits Limits

Provides access to request limit options.

MaxRequestBufferSize MaxRequestBufferSize MaxRequestBufferSize

This property is obsolete and will be removed in a future version. Use Limits.MaxRequestBufferSize instead.

Gets or sets the maximum size of the request buffer.

NoDelay NoDelay NoDelay

Set to false to enable Nagle's algorithm for all connections.

ShutdownTimeout ShutdownTimeout ShutdownTimeout

The amount of time after the server begins shutting down before connections will be forcefully closed. Kestrel will wait for the duration of the timeout for any ongoing request processing to complete before terminating the connection. No new connections or requests will be accepted during this time.

ThreadCount ThreadCount ThreadCount

The number of libuv I/O threads used to process requests.

Extension Methods

UseConnectionLogging(KestrelServerOptions) UseConnectionLogging(KestrelServerOptions) UseConnectionLogging(KestrelServerOptions)

Emits verbose logs for bytes read from and written to the connection.

UseConnectionLogging(KestrelServerOptions, String) UseConnectionLogging(KestrelServerOptions, String) UseConnectionLogging(KestrelServerOptions, String)

Emits verbose logs for bytes read from and written to the connection.

UseHttps(KestrelServerOptions, HttpsConnectionFilterOptions) UseHttps(KestrelServerOptions, HttpsConnectionFilterOptions) UseHttps(KestrelServerOptions, HttpsConnectionFilterOptions)

Configure Kestrel to use HTTPS.

UseHttps(KestrelServerOptions, X509Certificate2) UseHttps(KestrelServerOptions, X509Certificate2) UseHttps(KestrelServerOptions, X509Certificate2)

Configure Kestrel to use HTTPS.

UseHttps(KestrelServerOptions, String) UseHttps(KestrelServerOptions, String) UseHttps(KestrelServerOptions, String)

Configure Kestrel to use HTTPS.

UseHttps(KestrelServerOptions, String, String) UseHttps(KestrelServerOptions, String, String) UseHttps(KestrelServerOptions, String, String)

Configure Kestrel to use HTTPS.

Applies to