HttpContext.Current.Request.UserHostAddress; or HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
IPHostEntry GetIPHost = Dns.GetHostEntry(Request.UserHostName); if (GetIPHost != null) ip = GetIPHost.AddressList[0].ToString();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)