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

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -