detect mac address

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maniacCow
    New Member
    • Aug 2010
    • 24

    detect mac address

    Is there any way to detect mac address in website?
    I'm using c#
  • MrMancunian
    Recognized Expert Contributor
    • Jul 2008
    • 569

    #2
    I think you can use this code:
    Code:
    string strHostName = System.Net.Dns.GetHostName();
    string strMacAddress = System.Net.Dns.GetHostAddresses(strHostName).GetValue(0).ToString();
    Steven

    Comment

    • maniacCow
      New Member
      • Aug 2010
      • 24

      #3
      hmm... thx for the solution. it work. but... i found out, if others user in same network login to my localhost, the mac address is the same... any thing can represent the computer details?

      Comment

      • maniacCow
        New Member
        • Aug 2010
        • 24

        #4
        How bout detecting the physical address? izzit same as mac addresss?

        Comment

        • MrMancunian
          Recognized Expert Contributor
          • Jul 2008
          • 569

          #5
          It seems like it only returns the MAC for the machine that is hosting the page... I've been searching Google and it appears you can't get the user's MAC-address, unless it's in the same network. If there's a router on the line, it's not possible to get the client's MAC.

          Steven

          Comment

          • maniacCow
            New Member
            • Aug 2010
            • 24

            #6
            Yaya. Same network also can. I can't get the correct coding... Currently, I just can get IPv6 address only... Preferable get MAC address ;)

            Comment

            • Frinavale
              Recognized Expert Expert
              • Oct 2006
              • 9749

              #7
              Sorry, I don't understand how mac addresses are related to shopping carts?

              Comment

              • maniacCow
                New Member
                • Aug 2010
                • 24

                #8
                OPppss... Nop. Actualli just purpose to save the consumer logs only.

                Comment

                • Frinavale
                  Recognized Expert Expert
                  • Oct 2006
                  • 9749

                  #9
                  Typically e-commerce solutions do not store the user's mac address. There is no reason for it. The user may be on one computer purchasing something, then go over to another computer and make another purchase...it's the same person each time but the computer they used was different.

                  The is no reason, that I can think of, that you would need to do this.

                  Instead store the user-account's Identifier to indicate what user did whatever it is you're logging.

                  -Frinny
                  Last edited by Frinavale; Aug 20 '10, 01:41 PM.

                  Comment

                  Working...