G
Guest
Hello-
I'm working with a .NET windows service that can potentially take up to
10 minutes to shutdown. I would like to make it so that SCM doesn't
timeout before the service actually stops, but unfortunately have not
found a method that works.
I've tried using ServiceBase.RequestAdditionalTime in several ways:
1) Start the shutdown process in a seperate thread in OnStop and keep
requesting more time with ServiceBase.RequestAdditionalTime. (Doesn't
appear to work)
2) In OnStop use ServiceBase.RequestAdditionalTime to request 10
minutes, then start the shutdown (a blocking call). (Doesn't appear to
work).
3) Have the program generate an event during shutdown which causes the
service to RequestAdditionalTime. (Doesn't appear to work).
Does anybody have any suggestions? Is there something I can do to
configure SCM so that it respects the request for additional time? Is
there a better method than ServiceBase.RequestAdditionalTime?
Thanks,
eroc.
I'm working with a .NET windows service that can potentially take up to
10 minutes to shutdown. I would like to make it so that SCM doesn't
timeout before the service actually stops, but unfortunately have not
found a method that works.
I've tried using ServiceBase.RequestAdditionalTime in several ways:
1) Start the shutdown process in a seperate thread in OnStop and keep
requesting more time with ServiceBase.RequestAdditionalTime. (Doesn't
appear to work)
2) In OnStop use ServiceBase.RequestAdditionalTime to request 10
minutes, then start the shutdown (a blocking call). (Doesn't appear to
work).
3) Have the program generate an event during shutdown which causes the
service to RequestAdditionalTime. (Doesn't appear to work).
Does anybody have any suggestions? Is there something I can do to
configure SCM so that it respects the request for additional time? Is
there a better method than ServiceBase.RequestAdditionalTime?
Thanks,
eroc.