If you have access to the HttpContext
, you can get the Local/Remote IpAddress from the Connection
property like so:
var remote = this.HttpContext.Connection.RemoteIpAddress;
var local = this.HttpContext.Connection.LocalIpAddress;
If you have access to the HttpContext
, you can get the Local/Remote IpAddress from the Connection
property like so:
var remote = this.HttpContext.Connection.RemoteIpAddress;
var local = this.HttpContext.Connection.LocalIpAddress;