Hosting models
The .NET Core worker template is nothing more than a common .NET Core app. Furthermore, we can run the worker template as a common console application. Besides, the worker template also provides the hosting APIs to run the worker as an always-running process. In the case of Windows, it is possible to run the worker using Windows services technology. In the case of Linux, the worker runs using systemd.
Furthermore, .NET Core provides two different NuGet packages to specify the host behavior of the worker: the Microsoft.Extensions.Hosting.WindowsServices package and the Microsoft.Extensions.Hosting.Systemd package, both available on NuGet.
The Microsoft.Extensions.Hosting.WindowsServices package provides an extension method called ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access