F
Frank Rizzo
Hello,
My c# based windows service takes a while to dispose. I have to release
bunch of resources all over the place and unfortunately it can take
20-40 seconds before I can cleanly exit.
Every now and then, when I stop the service from the Services applet, it
will timeout and bring up an error message saying that the service isn't
responding.
My questions:
1. What is the timeout value for stopping the service. It almost
seems variable and random, but maybe it's my imagination.
2. Is there a way to change the timeout from inside the service (as needed)?
3. Is there a way to communicate with the services applet and tell it
cancel the stop request?
4. Is there a way to communicate with the services applet and tell it
that the service is in the middle of something now and cannot be stopped
(a user-friendly message).
Thanks.
My c# based windows service takes a while to dispose. I have to release
bunch of resources all over the place and unfortunately it can take
20-40 seconds before I can cleanly exit.
Every now and then, when I stop the service from the Services applet, it
will timeout and bring up an error message saying that the service isn't
responding.
My questions:
1. What is the timeout value for stopping the service. It almost
seems variable and random, but maybe it's my imagination.
2. Is there a way to change the timeout from inside the service (as needed)?
3. Is there a way to communicate with the services applet and tell it
cancel the stop request?
4. Is there a way to communicate with the services applet and tell it
that the service is in the middle of something now and cannot be stopped
(a user-friendly message).
Thanks.