WebHostService Clase
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Proporciona una implementación de un servicio de Windows que hospeda ASP.NET Core.
public ref class WebHostService : System::ServiceProcess::ServiceBase
public class WebHostService : System.ServiceProcess.ServiceBase
type WebHostService = class
inherit ServiceBase
Public Class WebHostService
Inherits ServiceBase
- Herencia
-
WebHostService
Constructores
| WebHostService(IWebHost) |
Crea una instancia de |
Métodos
| OnStart(String[]) | When implemented in a derived class, executes when a Start command is sent to the service by the Service Control Manager (SCM) or when the operating system starts (for a service that starts automatically). Specifies actions to take when the service starts. |
| OnStarted() |
Se ejecuta después de que se inicie ASP.NET Core. |
| OnStarting(String[]) |
Se ejecuta antes de que se inicie ASP.NET Core. |
| OnStop() | When implemented in a derived class, executes when a Stop command is sent to the service by the Service Control Manager (SCM). Specifies actions to take when a service stops running. |
| OnStopped() |
Se ejecuta después de que se apague ASP.NET Core. |
| OnStopping() |
Se ejecuta antes de que se cierre ASP.NET Core. |