Windows Service -> Stop immediately stops service, despite RequestAdditionalTime()

Windows Service -> Stop immediately stops service, despite RequestAdditionalTime()

Post by mjurba » Thu, 21 Jun 2007 02:59:23


I have a service that installs, starts, stops, etc. just fine.
It uses a system.timers.timer to reschedule the handler.
I am not using threads because I want exactly 1 file to be processed
at a time.

The handler processes files, which occasionally takes several minutes
for large test files.

However, when I use the windows services manager to stop the service,
it immediately kills the process/thread, even when I comment out my
call to (ServiceBase(this)).Stop()
or call (ServiceBase(this)).RequestAdditionalTime()

Is there a way to leave the currently-running handler running until
completion after the service's OnStop() has been called?
 
 
 

1. Need help with a script: start service -> run program -> stop service when program quits

2. Remote Control Client Agent service problem - Service will start but immediately stops

Recently, many of my SMS clients are failing to establish Remote Control
Sessions.

I discovered the Clients Remote Control Service is set to start
Automatically but the service is not actually running on the problem
clients.

If I manually start the service, I promptly get a message that the service
started and then stopped. It says that some services normally stop when
they don't have anything to do.

I coudln't find anything in Technet that describes this problem.

Im stumped on this one. Machines that are working appear identical to the
machines that can't run the service. All permissions are the same.
Repairing, removing and reinstalling the client agents doesn't seem to help.

Are there any parameters for Wuser32 to force it to stay started?

Steve

3. How to stop a service and wait until service stopped?

4. net stop indexing service also stop dhcp server service

5. WinHTTP Web Proxy Auto-Discovery Service service entered the stopped state - windows network monitor

6. How can I remotely stop Windows service, do some stuff, and start the remove service again.

7. SBS2K fax service stop alarm in services window

8. Security Service and Windows Wireless Service stopped working

9. Stop windows service copy data and then start service

10. Win XP's Universal Plug and Play Device Host service starts and then stops immediately

11. server service stops almost immediately

12. Win XP's Universal Plug and Play Device Host service starts and then stops immediately

13. WMPNetworkSvc - Service won't start, immediately stops after start

14. service started and stopped immediately

15. Session directory services starts and immediately stops