Search code examples
asp.netmac-address

How to get the MAC address of the visitors' PC in an ASP.NET webApp?


In an ASP.NET (C#) WebApp, I can get the IP of the visitors' PC easily, But How to get the MAC address of the visitors' PC in an ASP.NET webApp?

And this ASP.NET app is runing on the inner intranet of our company, and the visitors are also in the same inner intranet of our company.


Solution

  • The MAC address is not part of the IP header (or any other protocols above that), and thus not available if all you see is the HTTP traffic.

    EDIT (after OP's update): Since clients and servers are on the same internal network, wouldn't it be better to get a host name from the IP address instead of the MAC address? You can easily look up the host name based on the IP address.