The easiest way to implement self-service

I have a Windows service written in .NET and I need to be able to self-heal for it.

eg. the service constantly monitors the environment at startup, and as soon as the environment variable reaches threashold, the service must restart itself.

What's the easiest way to do this?

+2


source to share


2 answers


Ask the application to check the environment variable and exit when needed so that the service restarts from the recovery tab for the service. You can do this programmatically if you use code to install the service.



+5


source


Write service to start service!



+3


source







All Articles