In my Window service, if the service is turned on to connect to SQL Server, it throws an exception and the Windows service does not start. To overcome this situation, I installed a way to restore the Windows service for the first failure, the second unsuccessful restart of the service, Reset the number of failures after 1 day and restart the service to 0 minutes.
What I want is when the service throws an (unhandled) service exception, should go for the recovery option that I configured, and should try to restart the service. But that does not work.
After configuring the service for recovery, if I got into the Task Manager and manually finished the process, then only this recovery option will be applied.
Can someone help me with this?
source
share