Skip to content

stephanprobst/AspNetCore-WindowsServiceHost-Sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AspNetCore WindowsService Host

See: https://docs.microsoft.com/de-de/aspnet/core/hosting/windows-service

To build & publish service:

dotnet publish -c Release -o c:\svc\testservice

To install & start service:

sc create TestService binPath="C:\svc\testservice\WindowsServiceHost.exe"
sc start TestService

Open in browser:

http://localhost:7000/api/values

If you start it with debugger (Visual Studio) it listen to port 7001:

http://localhost:7001/api/values

To stop or delete the windows service run:

sc stop TestService
sc delete TestService

About

Sample project using a Windows Service as ASP.NET Core Host

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages