Reputation: 7465
something seems very wierd to me, I have tried to look inside WCF with Reflector but forgive me it's too hard to understand :(.
When client A call a duplex service on server B with wsDualHttpBinding, I was thinking that client A include the client base address (the address of the callback) in the header of the request like this
<a:ReplyTo>http://client.foo/29293-3287-2387-3291</a:ReplyTo>
.
But
OperationContext.Current.IncomingMessageHeaders.ReplyTo
returns null...
How wsDualHttpBinding is doing to know the address of the client channel ????
Is there some black magic or something ?
Solution
This is the reliable session which is responsible to transport the replyTo address. We can verify this with these binding elements in a customBinding
<reliableSession/>
<compositeDuplex/>
<oneWay></oneWay>
<textMessageEncoding></textMessageEncoding>
<httpTransport/>
Remove the reliableSession and your service have not the callback channel anymore...
Upvotes: 2
Views: 1351
Reputation: 118865
I think this information is passed via messages when establishing the session. If you use a tool like "fiddler" to watch all the http traffic, my hunch is you'll see it in an initial session setup message. No magic, the client has to tell the server 'where to call back'.
Upvotes: 2
Reputation: 22849
When I work with sockets, the caller's address is also available - my guess is that knowing to which address you'd need to reply to is a pretty low level feature of network communication...
Upvotes: 0