Soap Service only accessible when console program is running
===

I am currently working on a c#/php/soap project. What I want to be able to do is the console application makes use of a soap service, and the php web interface will call the soap service and call functions within the console application. 

At the moment, the web interface will always be able to talk to the soap service even when the console application isn't running. What I'm hoping is possible is when the web interface is loaded, if the console application isn't running then the soap service shouldn't be accessible and an error saying that the it isn't running. 

I've seen something like this done before but I can't figure out how this was achieved.

Thanks for any help you can provide