WebHost Class
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.
Caution
WebHost is obsolete. Use HostBuilder or WebApplicationBuilder instead. For more information, visit https://aka.ms/aspnet/deprecate/008.
Provides convenience methods for creating instances of IWebHost and IWebHostBuilder with pre-configured defaults.
public ref class WebHost abstract sealed
[System.Obsolete("WebHost is obsolete. Use HostBuilder or WebApplicationBuilder instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId="ASPDEPR008", UrlFormat="https://aka.ms/aspnet/deprecate/008")]
public static class WebHost
public static class WebHost
[<System.Obsolete("WebHost is obsolete. Use HostBuilder or WebApplicationBuilder instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId="ASPDEPR008", UrlFormat="https://aka.ms/aspnet/deprecate/008")>]
type WebHost = class
type WebHost = class
Public Class WebHost
- Inheritance
-
WebHost
- Attributes
Methods
| Name | Description |
|---|---|
| CreateDefaultBuilder() |
Initializes a new instance of the WebHostBuilder class with pre-configured defaults. |
| CreateDefaultBuilder(String[]) |
Initializes a new instance of the WebHostBuilder class with pre-configured defaults. |
| CreateDefaultBuilder<TStartup>(String[]) |
Initializes a new instance of the WebHostBuilder class with pre-configured defaults using typed Startup. |
| Start(Action<IRouteBuilder>) |
Initializes and starts a new IWebHost with pre-configured defaults. See CreateDefaultBuilder() for details. |
| Start(RequestDelegate) |
Initializes and starts a new IWebHost with pre-configured defaults. See CreateDefaultBuilder() for details. |
| Start(String, Action<IRouteBuilder>) |
Initializes and starts a new IWebHost with pre-configured defaults. See CreateDefaultBuilder() for details. |
| Start(String, RequestDelegate) |
Initializes and starts a new IWebHost with pre-configured defaults. See CreateDefaultBuilder() for details. |
| StartWith(Action<IApplicationBuilder>) |
Initializes and starts a new IWebHost with pre-configured defaults. See CreateDefaultBuilder() for details. |
| StartWith(String, Action<IApplicationBuilder>) |
Initializes and starts a new IWebHost with pre-configured defaults. See CreateDefaultBuilder() for details. |