如何获得系统Mac ID [英] How yo get the systems mac Id

查看:86
本文介绍了如何获得系统Mac ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是我的代码:

Below is my code:

protected string FetchMac()
   {
       string macAddr= "";

           foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces())
           {
               if (nic.OperationalStatus == OperationalStatus.Up)
               {
                   macAddresses += nic.GetPhysicalAddress().ToString();
                   break;
               }
           }
           lblMac.Text = macAddr.ToString();
           return macAddr;
       }
   }



该代码在本地主机上对我来说工作正常,它针对不同的系统显示了不同的MAC ID,但在服务器端不起作用...
在服务器端,它读取的所有系统MAC地址都是相同的 pls ,请帮助我.



This code is working fine for me at local host it shows different MAC IDs for different systems, but it''s not working at server side...
At server side it read all system MAC addresses is same pls please help me.

推荐答案

hi .. shetha
看看这是否对您有帮助

http://codingresource.blogspot.com/2010/02/get-client-mac-address-ip-address-using.html [ http://answers.yahoo.com/question/index?qid=20070622094940AA1e1B2 [ ^ ]
hi.. shetha
See if this can help you

http://codingresource.blogspot.com/2010/02/get-client-mac-address-ip-address-using.html[^]
http://answers.yahoo.com/question/index?qid=20070622094940AA1e1B2[^]


请找到搜索结果下方的链接之一,

Please find one of the link from below search result,

how to get the system''s mac address using c#.net[^]

Note: Finding from the above result will at least save your waiting time.

Hope it helps :)


这篇关于如何获得系统Mac ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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