In my project, we need to find out User MAC Address and IP Address kindly Provide the sample code (using C# Code behind or JavaScript or ActiveX controls). Thanks in Advance
var macAddress = ""; var ipAddress = ""; var computerName = ""; var wmi = GetObject("winmgmts:{impersonationLevel=impersonate}"); e = new Enumerator(wmi.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")); for(; !e.atEnd(); e.moveNext()) { var s = e.item(); macAddress = s.MACAddress; ipAddress = s.IPAddress(0); computerName = s.DNSHostName; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)