Click here to Skip to main content
14,980,146 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Below is my code:
C#
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;
       }
   }


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.
Posted
Updated 4-May-12 16:14pm
v2

   
v2
Comments
shwetha1 4-May-12 5:28am
   
Thanks for Share.... But,these 2 links are does not contained any information
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 :)
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900