1
我發現了以下內容到我的mvc控制器。但是,我將如何在我的cshtml中獲得結果?任何人有想法?獲取Harware地址或從設備獲取唯一ID
private string GetMacAddress()
{
string macAddresses = string.Empty;
foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces())
{
if (nic.OperationalStatus == OperationalStatus.Up)
{
macAddresses += nic.GetPhysicalAddress().ToString();
break;
}
}
return macAddresses;
}
http://stackoverflow.com/questions/1641868/how-t o-get-client-ip-address-using-jquery –
謝謝你這個Matt ..我使用這個解決方案:@ Request.UserHostAddress獲取ip地址..我正在尋找獨特的(硬件)地址 – user2385302
啊對不起那,這裏是關於mac地址的鏈接http://stackoverflow.com/questions/3385/mac-addresses-in-javascript –