如何获得客户机的MAC地址? [英] How to get MAC address of client machine?

查看:92
本文介绍了如何获得客户机的MAC地址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
  <一href=\"http://stackoverflow.com/questions/2018982/how-to-get-mac-address-of-client-machine-in-c-sharp-and-vb-net\">How获得客户机的MAC地址,在C#和vb.net

下面是我的code这在服务器端运行:

Below is my code which runs at server side:

NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
    foreach (NetworkInterface adapter in nics)
    {
        IPInterfaceProperties properties = adapter.GetIPProperties();
        string _temp = adapter.GetPhysicalAddress().ToString();
        if (!string.IsNullOrEmpty(_temp))
        {
            lblmac.Text = "your MAC address:<b> "+_temp+"</b>";
        }
    }

这给MAC(12 - 位十六进制数字)服务器的地址

which gives the MAC(12 - digit hexadecimal number)address of server

我需要得到客户机的MAC地址。

I need to get mac address of the client machine.

如何?

推荐答案

这不能做。

您可以无论如何解决此问题,并使其以便客户端告诉的服务器自己的MAC地址(你有code已经,应该很容易)。

You could anyway work around the issue and make it so clients tell the server their own MAC address (you have the code already, should be easy).

这篇关于如何获得客户机的MAC地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆