above code get the MAC address of server machine not of client machine

Posted by yallamrajuprasad-28816 under ASP.NET on 11/7/2014 | Points: 10 | Views : 1215 | Status : [Member] | Replies : 0
hello experts,
i m developing ASP.NET application. in that for the security purpose i want to use MAC address of the PC. for that i have wrote some code as:
NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
for (int j = 0; j <= 1; j++)
{
PhysicalAddress address = nics[j].GetPhysicalAddress();
byte[] bytes = address.GetAddressBytes();
for (int i = 0; i < bytes.Length; i++)
{
M = M + bytes[i].ToString("X2");
if (i != bytes.Length - 1)
{
M = M + ("-");
}
}
}


its working fine. i have host this application on local server in our office. NOW the problem is when user register himself from client machine, above code get the MAC address of server machine not of client machine.




Responses

(No response found.)

Login to post response