我想在 asp.net 中获取我的网站访问者的 mac 地址,我该怎么做?
此代码获取主机mac地址
ManagementClass objMC = new ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection objMOC = objMC.GetInstances();
foreach (ManagementObject objMO in objMOC)
{
if (!(bool)objMO["ipEnabled"])
continue;
string a = ((string)objMO["MACAddress"]);
}