WebHostService WebHostService WebHostService Class

Definition

Provides an implementation of a Windows service that hosts ASP.NET Core.

public class WebHostService : System.ServiceProcess.ServiceBase
type WebHostService = class
    inherit ServiceBase
Public Class WebHostService
Inherits ServiceBase
Inheritance
WebHostServiceWebHostServiceWebHostService

Constructors

WebHostService(IWebHost) WebHostService(IWebHost) WebHostService(IWebHost)

Creates an instance of WebHostService which hosts the specified web application.

Methods

OnStart(String[]) OnStart(String[]) OnStart(String[])
OnStarted() OnStarted() OnStarted()

Executes after ASP.NET Core starts.

OnStarting(String[]) OnStarting(String[]) OnStarting(String[])

Executes before ASP.NET Core starts.

OnStop() OnStop() OnStop()
OnStopped() OnStopped() OnStopped()

Executes after ASP.NET Core shuts down.

OnStopping() OnStopping() OnStopping()

Executes before ASP.NET Core shuts down.

Applies to