Q:

How to check WCF listener is up and running

I am doing smoke testing in my existing asp.net web application, I have developed one WCF service and added reference to that service in one console application and using console application it will make entry in database and that data will be used to plot chart in my web application.
Now I would like to know that how can I check that WCF listener is running or not from my web application because I have not added a reference to the WCF service directly in my web application, should I need to add it and call any function to check my test or can I do it some other ways?
Please guide me to achieve this step if this question make some sense! 
Thanks
Arun.

A:

To check if a WCF service is "alive" - you need to call it. 
I typically have a service method called GetVersion which just returns the version number of the service class - calling that will tell you whether or not the service is up and running.
But be aware: such "pings" to the service really only tell you that it was up and reachable that very moment you asked it - a fraction of a second later, the service could be down, the network could be clogged up or a cable could have been disconnected. 
My point is: doing these "is the WCF service alive?" checks is really not all that useful - the next call could just as well fail. So the basic premise is: always be prepared for a WCF service call to fail - and be prepared to handle that situation.

