I want to capture MAC address of Client in Web Application and Store Data for that MAC address. How can I acheive this.
I have tried this but it capture Address of server where it is hosted.
protected void Page_Load(object sender, EventArgs e)
{
lblMAC.Text = GetMACAddress();
}
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;
}