Click here to Skip to main content
15,887,875 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello,

how to window service restart after service failed in c# .net?

I have a window service but, i have a problem with that, when my service failed so, my windows service ha been stopped.
I do'nt want the service stop, i want to service restart after failure.

So, How can it possible?

Please help me.

Thanks in Advance.

Ankit Agarwal
Software Engineer
Posted

1 solution

You can configure recovery options for your windows service on the Recovery tab on the Service Properties dialog. Right-click your service in the service view and click properties.

It allows you to specify an action (such as Restart) for the first, second and subsequent failures of the service.


Hope this helps,
Fredrik
 
Share this answer
 
Comments
[no name] 4-Sep-13 3:57am    
how to set using c# .net?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900