Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
WebHostBuilderKestrelExtensions.ConfigureKestrel Method
Definition
- Namespace:
- Microsoft.AspNetCore.Hosting
- Assembly:
- Microsoft.AspNetCore.Server.Kestrel.dll
- Package:
- Microsoft.AspNetCore.App.Ref v10.0.0
- Package:
- Microsoft.AspNetCore.App.Ref v11.0.0-preview.4.26230.115
- Package:
- Microsoft.AspNetCore.Server.Kestrel v2.2.0
- Package:
- Microsoft.AspNetCore.App.Ref v3.0.1
- Package:
- Microsoft.AspNetCore.App.Ref v3.1.10
- 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
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 |
|---|---|
| ConfigureKestrel(IWebHostBuilder, Action<WebHostBuilderContext,KestrelServerOptions>) |
Configures Kestrel options but does not register an IServer. See UseKestrel(IWebHostBuilder). |
| ConfigureKestrel(IWebHostBuilder, Action<KestrelServerOptions>) |
Configures Kestrel options but does not register an IServer. See UseKestrel(IWebHostBuilder). |
ConfigureKestrel(IWebHostBuilder, Action<WebHostBuilderContext,KestrelServerOptions>)
Configures Kestrel options but does not register an IServer. See UseKestrel(IWebHostBuilder).
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ ConfigureKestrel(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Action<Microsoft::AspNetCore::Hosting::WebHostBuilderContext ^, Microsoft::AspNetCore::Server::Kestrel::Core::KestrelServerOptions ^> ^ configureOptions);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureKestrel(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext,Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions> configureOptions);
static member ConfigureKestrel : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext, Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function ConfigureKestrel (hostBuilder As IWebHostBuilder, configureOptions As Action(Of WebHostBuilderContext, KestrelServerOptions)) As IWebHostBuilder
Parameters
- hostBuilder
- IWebHostBuilder
The Microsoft.AspNetCore.Hosting.IWebHostBuilder to configure.
- configureOptions
- Action<WebHostBuilderContext,KestrelServerOptions>
A callback to configure Kestrel options.
Returns
The Microsoft.AspNetCore.Hosting.IWebHostBuilder.
Applies to
ConfigureKestrel(IWebHostBuilder, Action<KestrelServerOptions>)
Configures Kestrel options but does not register an IServer. See UseKestrel(IWebHostBuilder).
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ ConfigureKestrel(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Action<Microsoft::AspNetCore::Server::Kestrel::Core::KestrelServerOptions ^> ^ options);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureKestrel(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions> options);
static member ConfigureKestrel : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function ConfigureKestrel (hostBuilder As IWebHostBuilder, options As Action(Of KestrelServerOptions)) As IWebHostBuilder
Parameters
- hostBuilder
- IWebHostBuilder
The Microsoft.AspNetCore.Hosting.IWebHostBuilder to configure.
- options
- Action<KestrelServerOptions>
A callback to configure Kestrel options.
Returns
The Microsoft.AspNetCore.Hosting.IWebHostBuilder.
Applies to
Feedback
Was this page helpful?
