3

I couldn't track a machine using ip-address because I usually get proxy server address

public static String GetIP()
{
    String ip = 
        HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];

    if (string.IsNullOrEmpty(ip))
    {
        ip = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
    }

    return ip;
}

Are there any other ways to track a machine correctly?

Shajo
  • 873
  • 2
  • 11
  • 22
  • 1
    Even the mac address can be cloned. I don't think there's a 100% reliable solution for this, even if you install some client-side code. – Leo Jul 20 '14 at 15:43
  • @Leo let's not consider about mac address cloning.Is it possible to read the mac address of a client ? – Shajo Jul 20 '14 at 16:33
  • if the client allow some signed applet to work outside the sandbox, I guess so. – Leo Jul 20 '14 at 16:55
  • 1
    What is your use-case? Because I could have two computers on the same network accessing your site with two different accounts. What problem are you trying to solve or prevent? – Black Frog Jul 23 '14 at 14:03
  • @BlackFrog My use case is two accounts should not be allowed to login from a single computer using different browsers as well. – Shajo Jul 26 '14 at 11:42
  • @Leo do you have any sample for what you are suggesting because I am more willing to experiment it. – Shajo Jul 26 '14 at 11:44

1 Answers1

3

Reading ip-address is the only way But with that also you can't trace exactly due to Network address translators,Proxy servers and VPN servers etc.

You have to understand this its privacy issue

Even in iOS also they have forbidden to read UDID right from iOS 7 as it infringes users privacy

Hope this solves your problem

Venky
  • 559
  • 7
  • 25