How to automatically restart the service by Topshelf itself?

1,100 views
Skip to first unread message

tony zhang

unread,
Mar 15, 2012, 4:32:42 AM3/15/12
to topshelf-discuss
Hi,

I found that if something wrong in a service occurs, the service will
be terminated and won't work until I restart this service.
How could Topshelf restart the failed service ?

Thanks!

Travis Smith

unread,
Mar 15, 2012, 7:41:03 AM3/15/12
to topshelf...@googlegroups.com
We had someone pull request some service recovery options a while ago,
but never got them working right.

https://github.com/Topshelf/Topshelf/blob/master/src/Topshelf/OS/Windows/WindowsServiceControlManager.cs#L79

If you get that working right, you can configure windows service
recovery options, which I believe includes a restart option.

-Travis

tony zhang

unread,
Mar 19, 2012, 3:49:32 AM3/19/12
to topshelf-discuss
Thanks a lot,I'll try it.

Reply all
Reply to author
Forward
0 new messages