How do I get client IP address in ASP.NET Core?

Can you please let me know how to get client IP address in ASP.NET when using MVC 6.
Request.ServerVariables["REMOTE_ADDR"] does not work.

22 Answers
22

Leave a Comment