1
如何獲得最終的MACADDRESS用戶機器在asp.net如何獲得最終的MACADDRESS用戶機器在asp.net
Dim nics() As NetworkInterface = NetworkInterface.GetAllNetworkInterfaces()
Dim sMacAddress As String = String.Empty
Dim adapter As NetworkInterface
For Each adapter In nics
If sMacAddress = String.Empty Then
Dim properties As IPInterfaceProperties = adapter.GetIPProperties()
sMacAddress = adapter.GetPhysicalAddress().ToString()
End If
Next
通過使用上面的代碼我得到應用主機服務器機的MACADDRESS
dup? http://stackoverflow.com/questions/19285957/how-to-get-public-ip-address-of-a-user-in-c-sharp –
請解釋你試圖解決的實際問題。您很可能不需要客戶端的MAC地址。 – CodeCaster
@CodeCaster最有可能的是,這是一些問題,如身份驗證或防止一臺計算機上的多票投票等 - 如果您可以使用MAC,但是您不能:D – Luaan