GenericHostWebHostBuilderExtensions.ConfigureWebHost Method
Definition
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
ConfigureWebHost(IHostBuilder, Action<IWebHostBuilder>) |
Adds and configures an ASP.NET Core web application. |
ConfigureWebHost(IHostBuilder, Action<IWebHostBuilder>, Action<WebHostBuilderOptions>) |
Adds and configures an ASP.NET Core web application. |
ConfigureWebHost(IHostBuilder, Action<IWebHostBuilder>)
Adds and configures an ASP.NET Core web application.
public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureWebHost (this Microsoft.Extensions.Hosting.IHostBuilder builder, Action<Microsoft.AspNetCore.Hosting.IWebHostBuilder> configure);
static member ConfigureWebHost : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.AspNetCore.Hosting.IWebHostBuilder> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function ConfigureWebHost (builder As IHostBuilder, configure As Action(Of IWebHostBuilder)) As IHostBuilder
Parameters
- builder
- IHostBuilder
The IHostBuilder to add the IWebHostBuilder to.
- configure
- Action<IWebHostBuilder>
The delegate that configures the IWebHostBuilder.
Returns
The IHostBuilder.
Applies to
ConfigureWebHost(IHostBuilder, Action<IWebHostBuilder>, Action<WebHostBuilderOptions>)
Adds and configures an ASP.NET Core web application.
public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureWebHost (this Microsoft.Extensions.Hosting.IHostBuilder builder, Action<Microsoft.AspNetCore.Hosting.IWebHostBuilder> configure, Action<Microsoft.Extensions.Hosting.WebHostBuilderOptions> configureWebHostBuilder);
static member ConfigureWebHost : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.AspNetCore.Hosting.IWebHostBuilder> * Action<Microsoft.Extensions.Hosting.WebHostBuilderOptions> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function ConfigureWebHost (builder As IHostBuilder, configure As Action(Of IWebHostBuilder), configureWebHostBuilder As Action(Of WebHostBuilderOptions)) As IHostBuilder
Parameters
- builder
- IHostBuilder
The IHostBuilder to add the IWebHostBuilder to.
- configure
- Action<IWebHostBuilder>
The delegate that configures the IWebHostBuilder.
- configureWebHostBuilder
- Action<WebHostBuilderOptions>
The delegate that configures the WebHostBuilderOptions.
Returns
The IHostBuilder.