Click here to Skip to main content
11,933,038 members (56,858 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# Sockets
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 3:41am
Rate this: bad
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.
Sergey Alexandrovich Kryukov 26-Jun-12 15:02pm
Agree, a 5.
Rate this: bad
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("");
Shahin Khorshidnia 26-Jun-12 12:21pm

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151126.1 | Last Updated 26 Jun 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100