How to obtain the user's IP address

Hi there...

Probably a number of ways to tackle this. What I've done on the XData Server side is just pickup the client IP address within a service ednpoint call. Eg:

TMyService.GetClientIP(ClientName: String):String;
begin
  Result := TXDataOperationContext.Current.Request.RemoteIP;
  SomeLoggingFunction(ClientName, Result);
end;

You pass it some kind of client identifier (for example) and then you can log it in whatever way suits you along with the IP address that it is related to. The usual caveats apply of course about using IP addresses for anything too serious due to the prevalence of VPNs and the like.