Local machine's MAC address?

B

Bruce Barker

couple options.

1) write an active/x control that lookup up the mac address
2) write a .net control hosted by browser (will require user configure full
trust)
3) if the clients are on the local lan, ask the dhcp or wins servers for the
transaction


--- bruce (sqlwork.com)
 
G

Gabriel Magaña

How can I find the local Machine's MAC address using asp.net?

The web server's or the client's?
 
E

Eliyahu Goldin

If so, your original question is most confusing.

What does your problem have to do with asp.net?

To answer you question, try this:

ManagementClass mc = new ManagementClass("Win32_NetworkAdapter");
foreach (ManagementObject mo in mc.GetInstances())
{
string macAddr = mo["MACAddress"] as string;
if ( macAddr != null && macAddr.Trim() != "" )
return macAddr.ToString();
}



Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top