Request.UserHostAddress issue with return result "::1"

yohan.jayarathna picture yohan.jayarathna · Jun 20, 2011 · Viewed 36.8k times · Source

I am trying to get client ip address using

    HttpContext.Request.UserHostAddress;

but it returns ::1.

How to solve this?

Answer

V4Vendetta picture V4Vendetta · Jun 20, 2011

::1 is for localhost, Maybe this might be useful.