WebHost.Start 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
Start(RequestDelegate) |
Initializes and starts a new IWebHost with pre-configured defaults. See CreateDefaultBuilder() for details. |
Start(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. |
Start(String, Action<IRouteBuilder>) |
Initializes and starts a new IWebHost with pre-configured defaults. See CreateDefaultBuilder() for details. |
Start(RequestDelegate)
- Source:
- WebHost.cs
- Source:
- WebHost.cs
- Source:
- WebHost.cs
Initializes and starts a new IWebHost with pre-configured defaults. See CreateDefaultBuilder() for details.
public:
static Microsoft::AspNetCore::Hosting::IWebHost ^ Start(Microsoft::AspNetCore::Http::RequestDelegate ^ app);
public static Microsoft.AspNetCore.Hosting.IWebHost Start (Microsoft.AspNetCore.Http.RequestDelegate app);
static member Start : Microsoft.AspNetCore.Http.RequestDelegate -> Microsoft.AspNetCore.Hosting.IWebHost
Public Shared Function Start (app As RequestDelegate) As IWebHost
Parameters
- app
- RequestDelegate
A delegate that handles requests to the application.
Returns
A started IWebHost that hosts the application.
Applies to
Start(Action<IRouteBuilder>)
- Source:
- WebHost.cs
- Source:
- WebHost.cs
- Source:
- WebHost.cs
Initializes and starts a new IWebHost with pre-configured defaults. See CreateDefaultBuilder() for details.
public:
static Microsoft::AspNetCore::Hosting::IWebHost ^ Start(Action<Microsoft::AspNetCore::Routing::IRouteBuilder ^> ^ routeBuilder);
public static Microsoft.AspNetCore.Hosting.IWebHost Start (Action<Microsoft.AspNetCore.Routing.IRouteBuilder> routeBuilder);
static member Start : Action<Microsoft.AspNetCore.Routing.IRouteBuilder> -> Microsoft.AspNetCore.Hosting.IWebHost
Public Shared Function Start (routeBuilder As Action(Of IRouteBuilder)) As IWebHost
Parameters
- routeBuilder
- Action<IRouteBuilder>
A delegate that configures the router for handling requests to the application.
Returns
A started IWebHost that hosts the application.
Applies to
Start(String, RequestDelegate)
- Source:
- WebHost.cs
- Source:
- WebHost.cs
- Source:
- WebHost.cs
Initializes and starts a new IWebHost with pre-configured defaults. See CreateDefaultBuilder() for details.
public:
static Microsoft::AspNetCore::Hosting::IWebHost ^ Start(System::String ^ url, Microsoft::AspNetCore::Http::RequestDelegate ^ app);
public static Microsoft.AspNetCore.Hosting.IWebHost Start (string url, Microsoft.AspNetCore.Http.RequestDelegate app);
static member Start : string * Microsoft.AspNetCore.Http.RequestDelegate -> Microsoft.AspNetCore.Hosting.IWebHost
Public Shared Function Start (url As String, app As RequestDelegate) As IWebHost
Parameters
- url
- String
The URL the hosted application will listen on.
- app
- RequestDelegate
A delegate that handles requests to the application.
Returns
A started IWebHost that hosts the application.
Applies to
Start(String, Action<IRouteBuilder>)
- Source:
- WebHost.cs
- Source:
- WebHost.cs
- Source:
- WebHost.cs
Initializes and starts a new IWebHost with pre-configured defaults. See CreateDefaultBuilder() for details.
public:
static Microsoft::AspNetCore::Hosting::IWebHost ^ Start(System::String ^ url, Action<Microsoft::AspNetCore::Routing::IRouteBuilder ^> ^ routeBuilder);
public static Microsoft.AspNetCore.Hosting.IWebHost Start (string url, Action<Microsoft.AspNetCore.Routing.IRouteBuilder> routeBuilder);
static member Start : string * Action<Microsoft.AspNetCore.Routing.IRouteBuilder> -> Microsoft.AspNetCore.Hosting.IWebHost
Public Shared Function Start (url As String, routeBuilder As Action(Of IRouteBuilder)) As IWebHost
Parameters
- url
- String
The URL the hosted application will listen on.
- routeBuilder
- Action<IRouteBuilder>
A delegate that configures the router for handling requests to the application.
Returns
A started IWebHost that hosts the application.