string Device_IP = ""; if (!string.IsNullOrEmpty(Request.ServerVariables["HTTP_VIA"])) { // ' using proxy // ' Return real client IP. Device_IP = Convert.ToString(Request.ServerVariables["HTTP_X_FORWARDED_FOR"]); } else { // 'not using proxy or can't get the Client IP // 'While it can't get the Client IP, it will return proxy IP. Device_IP = Convert.ToString(Request.ServerVariables["REMOTE_ADDR"]); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)