For obtaining client IP in WCF i use the following method:
public static byte[] GetUserIP(OperationContext context)
{
var messageProperties = context.IncomingMessageProperties;
RemoteEndpointMessageProperty endpointProperty =
messageProperties[RemoteEndpointMessageProperty.Name]
as RemoteEndpointMessageProperty;
return GetIPFromString(endpointProperty.Address);
}
My machine has some local IPv4 and this method was working until yesterday.. May be our network admins changed something; i dont know, but now the endpointProperty.Address
is returning "::1" and not "xxx.xxx.xxx.xxx". Can someone explain what can cause such thing?