Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi everyone,

I'm developing an application with Visual Studio, which lists every device in a network, and then give the MAC address. The devices are listed in a combo box, which the user can select which one he( or she) likes, and then the MAC address of that device should be shown in another textbox

I'm already done with the list in a combo box, but the get MAC address part is too hard. Anyone can help me please?

Much appreciated
Posted

I googled "c# get mac address of remote machine" and this was the first hit

https://social.msdn.microsoft.com/Forums/en-US/9971c7f2-3145-4a76-a3b4-80b900eb8296/how-to-get-remote-pcs-mac-addess?forum=netfxnetcom[^]

To preempt your next question, it doesn't matter how much you need\want MAC address from machines not on your network, you can't get them unless the client sends the address to you itself.
 
Share this answer
 
The problem with doing this is you won't get the MAC of the target machine. You'll end up getting the MAC address of the near-side interface of the router closest to your machine in the network path to the target.

You might want to read up on what a MAC address is[^] and what it's used for in the network world before trying to use it for something it was never designed for. Really, there is no use for a MAC address outside of networking.
 
Share this answer
 
v2
Thanks for the answers. The devices are on the same Wlan-Network Smile | :)

IS there any way i can get MAc address?
 
Share this answer
 
Comments
F-ES Sitecore 24-Mar-15 15:56pm    
Did you actually read any of the answers? There was a link posted to the code to get the MAC address of a remote machine.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900