Paul Rajs

Paul Rajs

  • NA
  • 641
  • 146k

can't get the correct User's Machine IP Address on Live Serv

Jul 17 2018 5:04 AM
hi , Developers ,
i want to get and insert the users machines ip address.
i am added the following code and host it on live server.
string ipaddress;
ipaddress = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (ipaddress == "" || ipaddress == null)
ipaddress = Request.ServerVariables["REMOTE_ADDR"];
it shows all ip address default value of this - 61.8.146.97
i have no idea about this on live.
if anyone know please suggest how to fix the issue.
thanking you
Paul,.S

Answers (1)