how to get mac address of client that browse web site by asp.net mvc c#

后端 未结 2 1946
忘了有多久
忘了有多久 2020-11-27 20:18

I\'m trying to get mac address from the client\'s machine that browse my web site, I\'ve been used this:

using System.Management;
class Sample_ManagementClas         


        
2条回答
  •  一生所求
    2020-11-27 21:16

    It is usually not possible for a person to get the MAC address of a computer from its IP address alone. These two addresses originate from different sources. Simply stated, a computer's own hardware configuration determines its MAC address while the configuration of the network it is connected to determines its IP address. However, computers connected to the same TCP/IP local network can determine each other's MAC addresses. The technology called ARP - Address Resolution Protocol included with TCP/IP makes it possible. Using ARP, each computer maintains a list of both IP and MAC addresses for each device it has recently communicated with.

    Src

提交回复
热议问题