![]() Mac_dest = mac_dest.Insert(0, mac_src.Substring(i, 2)) Int res = SendARP(ldest, 0, ref macinfo, ref len) Private static string GetClientMAC(string strClientIP) Private static extern Int32 inet_addr(string ip) Private static extern int SendARP(Int32 dest, Int32 host, ref Int64 mac, ref Int32 length) You can use this code to get the mac address of the client machine in asp.net c#, public string GetIPAddress() (Client Server), in order to get the IP address of a user. You can never get the MAC address of a user connected to your website, when a socket connection occurs between the destination (your website's server) and a source (client's computer) you can only get the source IP address, for the MAC address it's never sent over the socket connection.
0 Comments
Leave a Reply. |