Question

I have a WCF Interface which has defined a Callback. This is working very well.

Now I have another Client which don't need the callback. I wanted to know if there is a way to connect to the service also without specifying a callback object?

I tried without the DuplexChannel factory, or DuplexChannelFactory with InstanceContext (null), both it didn't work!

Is there a way to do it?

Was it helpful?

Solution 2

I now tryed with this the class from here: http://www.codeproject.com/Articles/22832/Automatic-Interface-Implementer-An-Example-of-Runt worked very well!

OTHER TIPS

The best way would be to create another interface without the CallbackContract and expose that on a separate Endpoint. That would give you a clean separation between the two code paths and the client could choose which one to use.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top