How to remote ip address of my machine?
string ipList = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (!string.IsNullOrEmpty(ipList))
{
return ipList.Split(',')[0];
}
return Request.ServerVariables["REMOTE_ADDR"];
i am using above code. but its returns localhost address like 127.0.0.1. how can i use this code