0

I am trying to implement a generic "IsAlive" capabilities to any wcf service hosted through my api. I tried adding an enpoint to the service host at runtime which uses a IIsAlive interface as its callback.

The problem is that wcf checks and sees that the service implementation class does not implement that contract. I dont mind this, i could resolve it later with runtime proxies or instance provider which will return my implementation of that method. So i need to suppress wcf from shouting at me, is that possible?

If not is there a way to achieve my desired result? ( to expose an api that has a host method and a get proxy method which will add isalive capabilities to the service without the user having to implement it)

Thanks

Jason
  • 4,034
  • 4
  • 40
  • 62
  • Not the most elegant solution, but you could have all services derive from a base class that implements the IsAlive method - you could even mark the class `abstract`. It would need to implement your `IIsAlive` interface. – Tim Sep 16 '13 at 18:25
  • @Tim, thanks for the offer, I had considred that but I really want to avoid that if possible this is why I am playing around with these dynamic enpoints and things. I have found this: https://github.com/stefsewell/WCFPing However because this is not a contract on the endpoint it requires users to build their own soap messages (like in the test) or use visual studio to generate the client from the mex endpoint (which is also something I want to avoid) – Jason Sep 16 '13 at 20:00

0 Answers0