DotNetCore.WindowsService
DotNetCore.WindowsService copied to clipboard
When starting the service, then immediately stopped too
.NET Core: 2.1 PeterKottas.DotNetCore.WindowsService: 2.0.9
When I start my window service as command line, I have this message:
Starting up as a console service host
Service MyTestService started
I started
E:\dev\serviceWindowsNetCore\bin\Release\netcoreapp2.0\win-x64\log.txt
The MyTestService service is now running, press Control+C to exit.
Stopping the MyTestService service
Service MyTestService stopped
I stopped
The MyTestService service has stopped.
Control+C detected, attempting to stop service.
Service MyTestService stopped
I stopped
The MyTestService service has stopped.
Why service is stopped before call control+C ? After installing as a window service, starting has an error message: "The My Test Service service on Local Computer started and then stopped."