Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
There are some article in code project talk about this,
however when i try to download and study the source code,
the link is broken!
Is there any suggestion?
 
If possible , i would like to try on developing a system that can scan the network and list out all the active PC within the network~
 
Question: what shall i know/study in order to achieve the requirement? (scan and list out the network)
Posted 26-Jun-12 2:41am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Here is an article by Sacha Barber that has a working link:
 
Retreiving a list of network computer names using C#[^]
 
Basically, if you want to roll your own, I would recommend you first find your network IP address and Subnet. This will tell you what possible IP addresses other devices on the network have. Then you can ping each one to determine if they respond. On those that ping, do a WMI call to ask what their name is. If they respond, record that information. You now have a rudimentary network scanner.
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 26-Jun-12 15:02pm
   
Agree, a 5. --SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

This does more than you want (it retrieves the MAC address as well) but it does retrieve the IP addresses on the LAN - to convert them to the name is pretty simple: Retrieving IP and MAC addresses for a LAN[^]
 
            System.Net.IPHostEntry he = System.Net.Dns.GetHostByAddress("192.168.0.10");
            Console.WriteLine(he.HostName);
  Permalink  
Comments
Shahin Khorshidnia at 26-Jun-12 12:21pm
   
+5

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 sanket saxena 355
1 Abhinav S 303
2 Sergey Alexandrovich Kryukov 299
3 OriginalGriff 225
4 thatraja 220
0 Sergey Alexandrovich Kryukov 8,497
1 OriginalGriff 4,850
2 Peter Leow 3,839
3 Maciej Los 3,535
4 Er. Puneet Goel 3,107


Advertise | Privacy | Mobile
Web02 | 2.8.140415.2 | Last Updated 26 Jun 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid