Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

KestrelServerOptions.Configure Method

Definition

Namespace:
Microsoft.AspNetCore.Server.Kestrel.Core
Assembly:
Microsoft.AspNetCore.Server.Kestrel.Core.dll
Package:
Microsoft.AspNetCore.App.Ref v10.0.0
Package:
Microsoft.AspNetCore.App.Ref v11.0.0-preview.4.26230.115
Package:
Microsoft.AspNetCore.App.Ref v5.0.0
Package:
Microsoft.AspNetCore.App.Ref v6.0.36
Package:
Microsoft.AspNetCore.App.Ref v7.0.5
Package:
Microsoft.AspNetCore.App.Ref v8.0.19
Package:
Microsoft.AspNetCore.App.Ref v9.0.8
Package:
Microsoft.AspNetCore.Server.Kestrel.Core v2.1.0
Package:
Microsoft.AspNetCore.Server.Kestrel.Core v2.2.0
Package:
Microsoft.AspNetCore.App.Ref v3.0.1
Package:
Microsoft.AspNetCore.App.Ref v3.1.10

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Overloads

Name Description
Configure(IConfiguration, Boolean)

Creates a configuration loader for setting up Kestrel that takes an IConfiguration as input. This configuration must be scoped to the configuration section for Kestrel.

Configure()

Creates a configuration loader for setting up Kestrel.

Configure(IConfiguration)

Creates a configuration loader for setting up Kestrel that takes an IConfiguration as input. This configuration must be scoped to the configuration section for Kestrel. Call Configure(IConfiguration, Boolean) to enable dynamic endpoint binding updates.

Configure(IConfiguration, Boolean)

Source:
KestrelServerOptions.cs

Creates a configuration loader for setting up Kestrel that takes an IConfiguration as input. This configuration must be scoped to the configuration section for Kestrel.

public:
 Microsoft::AspNetCore::Server::Kestrel::KestrelConfigurationLoader ^ Configure(Microsoft::Extensions::Configuration::IConfiguration ^ config, bool reloadOnChange);
public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader Configure(Microsoft.Extensions.Configuration.IConfiguration config, bool reloadOnChange);
member this.Configure : Microsoft.Extensions.Configuration.IConfiguration * bool -> Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader
Public Function Configure (config As IConfiguration, reloadOnChange As Boolean) As KestrelConfigurationLoader

Parameters

config
IConfiguration

The configuration section for Kestrel.

reloadOnChange
Boolean

If true, Kestrel will dynamically update endpoint bindings when configuration changes. This will only reload endpoints defined in the "Endpoints" section of your config. Endpoints defined in code will not be reloaded.

Returns

A KestrelConfigurationLoader for further endpoint configuration.

Applies to

Configure()

Source:
KestrelServerOptions.cs
Source:
KestrelServerOptions.cs
Source:
KestrelServerOptions.cs

Creates a configuration loader for setting up Kestrel.

public:
 Microsoft::AspNetCore::Server::Kestrel::KestrelConfigurationLoader ^ Configure();
public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader Configure();
member this.Configure : unit -> Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader
Public Function Configure () As KestrelConfigurationLoader

Returns

A KestrelConfigurationLoader for configuring endpoints.

Applies to

Configure(IConfiguration)

Source:
KestrelServerOptions.cs
Source:
KestrelServerOptions.cs
Source:
KestrelServerOptions.cs

Creates a configuration loader for setting up Kestrel that takes an IConfiguration as input. This configuration must be scoped to the configuration section for Kestrel. Call Configure(IConfiguration, Boolean) to enable dynamic endpoint binding updates.

public:
 Microsoft::AspNetCore::Server::Kestrel::KestrelConfigurationLoader ^ Configure(Microsoft::Extensions::Configuration::IConfiguration ^ config);
public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader Configure(Microsoft.Extensions.Configuration.IConfiguration config);
member this.Configure : Microsoft.Extensions.Configuration.IConfiguration -> Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader
Public Function Configure (config As IConfiguration) As KestrelConfigurationLoader

Parameters

config
IConfiguration

The configuration section for Kestrel.

Returns

A KestrelConfigurationLoader for further endpoint configuration.

Applies to


Feedback

Was this page helpful?