var result = GetUser_IP(); protected string GetUser_IP() { string ipList = Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (!string.IsNullOrEmpty(ipList)) { return ipList.Split(',')[0]; } return Request.ServerVariables["REMOTE_ADDR"]; } result always displays ::1 why can I not see IP address instead of ::1
Also what is ::1 for a IP address result ?
What I miss in code, how can I get my IP address like in http://whatismyipaddress.com/ ?
Any help will be appreciated.
Thanks.