I have a service which send a message with the ReplyTo header set to a return address. I thought that :
OperationContext.Current.GetCallbackChannel<IHelloCallback>().RespondHello("tomi");
will automatically invoke my client, but I receive this exception :
For sending a message on server side composite duplex channels, the message must have either the 'Via' property or the 'To' header set.
Am I doing something wrong or WCF is a little bit lazy ?
Currently, I use a behavior with a message inspector to make these headers match, but it seems a little hacky...
ps : I'm using MSMQ
Update
I've created two binding elements to make msmq over duplex work it's available on codeplex You can see the whole example, but like I said, because of this error I use a behavior with a message inspector to set the To header of outgoing message to the ReplyTo of the incoming message. What is strange is that my client, doesn't need this behavior and he is able tu callback my service too.