本文介绍了获取服务器mac地址,但我想要客户端mac地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

大家好,

i试图获取客户端机器的mac地址,但是当我在服务器上传时,我得到服务器mac地址而不是客户端mac地址。

plz any这个问题的解决方案。

i想要客户端mac地址。



谢谢



我尝试过:



公共字符串GetMACAddress()

{

NetworkInterface [] nics = NetworkInterface.GetAllNetworkInterfaces();

String sMacAddress = string.Empty;

foreach(nics中的NetworkInterface适配器)

{

if(sMacAddress == String.Empty)//仅从第一张卡返回MAC地址

{

IPInterfaceProperties properties = adapter.GetIPProperties ();

sMacAddress = adapter.GetPhysicalAddress()。ToString();

}

}

返回sMacAddress;





}

Hello all,
i trying to get mac address of client machine but when i upload on server i am getting server mac address instead of client mac address.
plz any solution for this problem.
i want client mac address.

thanks

What I have tried:

public string GetMACAddress()
{
NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
String sMacAddress = string.Empty;
foreach (NetworkInterface adapter in nics)
{
if (sMacAddress == String.Empty)// only return MAC Address from first card
{
IPInterfaceProperties properties = adapter.GetIPProperties();
sMacAddress = adapter.GetPhysicalAddress().ToString();
}
}
return sMacAddress;


}

推荐答案


这篇关于获取服务器mac地址,但我想要客户端mac地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-08 14:08