简体   繁体   中英

WCF Client Channel Watchdog (Monitoring)

In a current project, we have many different WCF services that implement different interfaces. Because everything is a heavily managed environment, we need to have some sort of watchdog instance for each WCF services that checks for availability to tell our management system that a certain service is available before making any calls to it.

After googling for hours, the only way I see how to accomplish this is by implementing some sort of ping method in the service contract that gets called periodically in a thread to lookup the status of a service. But having many different services (of which some of them are black boxes that don't implement some sort of "Ping()" method), we don't want to implement the Ping() procedure for every interface. We already thought of implementing a management base interface for all of our contracts, but afterall, there are still web services where we can't change anything because they aren't ours.

Is there any possibility to achieve this? Having some sort of service/client channel watchdog that does automatic keep alive messages / pings and reports connectivity issues or other incidents?

Too long for a comment grrr...

Have you checked ServiceMon and examined it's extensibility?... look at WCF service health monitoring or simply is it possible to query each service using HTTPGet and check for content in it's response which would imply it's running?

A simple way is to ping the wsdl. If the webservice is down, you'll get an error when trying to get and fetch that info.

A WCF serice is no more than a website (a special website, but a website after all), so any website monitoring tool will do the job.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM