tags:

views:

406

answers:

2

Context: I am hosting a number of services using WCF. I'd like for each of them to support a Ping operation (heartbeat, keep-alive, whatever...). But, I'd rather not go implement IPingable on each one. Instead, I'd love to do something like the serviceMetadata behavior does and dynamically add a channel dispatcher. This would mean all I'd need to do is add a pingable behvaior to the services and this operation is supported.

Any ideas? I've looked through the the source code of serviceMetadata and there is all kinds of internal stuff being called I don't have access to. Also, there may be an easier way.

Thanks for your time.

A: 

Just off the top of my head could you add a dispatch behaviour that would handle the call and spoof the return true/false?

I also found the following

Preet Sangha
That is what I would love to do, I just can't find any help on doing it.
Craig Wilson
Couldn't find what I wanted but I have added another idea/link that might help.
Preet Sangha
A: 

If you do it through a behavior, will your metadata indicate that the Ping operation exists?

John Saunders
I don't really care if the metadata indicates it exists.
Craig Wilson