vb.net - Recovery on Failure for a Windows Service Application -
i having trouble getting feature recovery on failure work windows service application. set in restart application on first failure. test in use line of code
system.environment.exit(-1)
this causes application end okay doesn't restart.
it reasonable suppose service process exiting without setting service status stopped constitute failure. however, isn't case. (perhaps backwards compatibility; there might many third-party services such change break.)
however, if process exits result of unhandled exception, considered service failure , triggers recovery options. if want cause service fail, raise exception (and don't catch it).
Comments
Post a Comment