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

yallamrajuprasad-28816
Posted by yallamrajuprasad-28816 under ASP.NET category on | Points: 40 | Views : 605
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.

Comments or Responses

Posted by: Goud.Kv on: 11/7/2014 Level:Gold | Status: [Member] [MVP] | Points: 10
Hi Prasad,

Please ask in Forums to get quick response on this...

Thanks,
Krishna

Login to post response