Starting and stopping Windows services

The release notes for 2014r3 contains

I can’t find anything in the LR about how to use this. How can I use this feature?

You put code in those events to do something when your app is acted on by the outside and told to pause, resume or stop. Not sure if it only applies to standalone apps that you’ve set up as a service, or if it applies to cgi apps, too.

As Tim says these are to allow your app to respond to events from the windows service manager. To actually initiate these you’d use the SC command (shell) or services.msc.

The usefulness of Pause & Resume mystifies me as I don’t see any way of stopping or starting a web service from listening to connections.

Note that even though you can create, pause or delete a Windows service from the shell, I have had trouble getting a brand new Windows Service to start the first time — you need to start it manually (via Task Manager > Services) or reboot to start it. Once created you can pause and restart the service. I think this is a Windows limitation.

Hi David,
in the Windows Functionalty Suite (WFS) there are functions to create, start, stop and delete services programatically.
I use these functions with no troubles.

@Maurizio Rossi Thank you, I didn’t realise that.

Those events are useful because the connections can be directed to a blank page and their sessions issued a Quit, background Threads can be stopped, etc. but those events would be much more useful if we had a means of ignoring connection attempts in Web apps. Perhaps a feature request is due. :wink:

feedback://showreport?report_id=37892 WebApplication - Pause/Resume Accepting Connections