Skip to content
Loading
  • 0
    Please try this 
     
    1. String lstrIpAddress;  
    2. if (Request.ServerVariables["HTTP_X_FORWARDED_FOR"] != null || Request.ServerVariables["HTTP_CLIENT_IP"] != null)  
    3. lstrIpAddress = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];  
    4. else  
    5. lstrIpAddress = Request.ServerVariables["REMOTE_ADDR"];  
    0
  • Raja
    0
    I try this but it is not working.this is getting only local ip and ipv6 only. it is dont get the public ip :)
    0