for mac address

Posted by Vikashsingh0 under ASP.NET category on | Points: 40 | Views : 1392

i have applied below code for client side mac address

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;

but the out put of above code is mac address of server computer

so please help me about how to get mac address of client computer


Comments or Responses

Posted by: Jayakumars on: 7/15/2015 Level:Bronze | Status: [Member] [MVP] | Points: 10

Good post keep it up.

How to find How may connection corresponding internet connection?

Login to post response