Pergunta

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?

Foi útil?

Solução 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!

Outras dicas

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top