How can I obtain the server address that was used for a request when it has multiple IP addresses?
E.g.
- the server has the addresses 10.0.0.1 and 10.0.0.2.
- when processing the request the server service needs to know if 10.0.0.1 or 10.0.0.2 was used by the client to connect to it.
So far I only found that
OperationContext.Current.EndpointDispatcher.EndpointAddress
andOperationContext.Current.Channel.LocalAddress
contain the address from .config (e.g. localhost)OperationContext.Current.IncomingMessageProperties.Via
contains the Url that the client used to connect to the server (but this might just be a name from the clients hosts file).
EDIT: still looking for a solution...