I want to get the client IP address in a WCF Service hosted using HTTPS 443 bindings. I am getting the Host IP address by below code.
private string GetIP()
{
OperationContext context = OperationContext.Current;
MessageProperties prop = context.IncomingMessageProperties;
RemoteEndpointMessageProperty endpoint =
prop[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty;
string ip = endpoint.Address;
return ip ;
}
Please help if you have any suggestions on this.
Thanks in advance.
Regards.
Reishabh