WebHostService Clase

Definición

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 WebHostService que hospeda la aplicación web especificada.

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.

Se aplica a