I have a WCF service on a duplex channel with a callback contract. The service monitors clients by storing the result of OperationContext.Current.GetCallbackChannel<T>() in the list when the client calls the SubscribeMe() method in the service. The service will periodically ping these callback channels in order to track their validity and expire those that are closed or fail.
I have a question: how to get information about the remote host when the remote host does not actively request my service, for example, when I call MyCallbackContract.Ping() ?
I tried to make the IContextChannel callback channel object and access the IContextChannel::RemoteAddress property, but this property contains some namespace URI that has nothing to do with the actual remote host in the callback channel.
source share