-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running .net core application as windows service #1845
Comments
I don't think [EDIT] Also, see: #1386 and especially https://github.com/dasMulli/dotnet-win32-service |
Hi there, I think I have exactly what you are looking for. Check this out, hope it helps : https://github.com/PeterKottas/DotNetCore.WindowsService |
I know this won't help everyone, but the easiest solution for us was to drop a CLI application in Docker and tell Docker to restart it if it failed. |
Yep for docker that's probably the best solution. |
This issue is being closed because it has not been updated in 3 months. We apologize if this causes any inconvenience. We ask that if you are still encountering this issue, please log a new issue with updated information and we will investigate. |
Hello All,
I am trying to create and run the .net core application as windows service. While creating the service I am using
WebHostService
class whereOnStarted,OnStarting
etc such method are overridable.So my question is in which method I should write my business logic(like getting data from db ett.) Started or Starting ?
Because previously we used to write in OnStart method but that is not available(it is sealed method)
Or do I need to use
ServiceBase
class to use OnStart method ?Below is my class
Also when I run the service using net start command nothing is printed on the command prompt ? why is it so ?
Thanks for the help !
The text was updated successfully, but these errors were encountered: