c# - What windows service state is appropriate if OnStart failed -
i have windows service on c#.
in end of onstart set state service_running.
what would appropriate status if onstart caught exception?
also how should stop service in such event?
you may set status stopped , throw exception:
public override void onstart(string[] args) { . . . if(somethingwrong) throw new exception("something wrong"); }
Comments
Post a Comment