Acquiring client originating IP address (with Akamai and CloudFlare support) in ASP.NET Core

added by DotNetKicks
4/18/2018 2:06:53 PM

1 Kicks, 297 Views

Sometimes there is a need for a web application to acquire client originating IP address (location dependent content, audit requirements etc.). ASP.NET Core provides HttpContext.Connection.RemoteIpAddress property which provides originating IP address for the connection. In todays web the origin of connection seen by the web server is rarely the client, more likely the last proxy on the path.


0 comments