5
Answers

I need IP address of the current user system within the remo

Hiiiiiiiii
           i need IP address of the current user in Asp.net,i used below code to get IP Address ,but i am getting IP Address of the User LAN,please suggest me 
 
var ipAddress = HttpContext.Current.Request.ServerVariables["X_FORWARDED_FOR"];
if (string.IsNullOrEmpty(ipAddress))
{
ipAddress = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
}
 
Answers (5)