When a .Net service crashes, does the ServiceBase.OnStop method get called? Will the service be marked as stopped regardless of whether or not the OnStop method is called?
When a .Net service crashes, does the ServiceBase.OnStop method get called? Will the service
Share
use try-catch and call OnStop yourself; don’t rely on ‘auto-stop’, even if it was ‘guaranteed’ it is still not a good idea. Services should be as robust as possible.