Home All Groups Group Topic Archive Search About

windows service restart

Author
25 May 2006 3:56 PM
Sergey Krutous
Can you please help me to resolve the following issue:
I developed a windows service. At start up  (I have overriden OnStart
method) it connects to a web service and if the connection fails the windows
service sets ExitCode property to non-zero value (55) and calls Stop method.
If this happens when user starts the service in Services snap-in SCM shows
error massage and service stops - it's OK.
I configured automatic startup and Recovery settings for the service:
    - set 'restart the service' for the first, second and subsequent failures,
    - 'reset fail count after' 0 days,
    - 'restart service after' 1 minute
but SCM does not attempt to restart the service at startup if error happens.

AddThis Social Bookmark Button