Solved

List all network computer by thier IP addresses?

Posted on 2007-11-13
4
1,564 Views
Last Modified: 2010-08-05
I cannot locate any code on the Internet that lists all network computer by thier IP addresses.

Help
0
Comment
Question by:kvnsdr
  • 2
4 Comments
 
LVL 1

Author Comment

by:kvnsdr
ID: 20277635
Also, using .NET namespaces without having to import Windows dlls.
0
 
LVL 2

Accepted Solution

by:
HeidarV earned 125 total points
ID: 20278180
hi
you can use Ping like bellow and ping all computers in the range of yours and look for replies.

System.Net.NetworkInformation.Ping ping = new Ping();
for (int i = 0; i < 255; i++)
{
      PingReply pr = ping.Send(new IPAddress(new byte[] { 192, 168, 1, i }));
      if (pr.Status == IPStatus.Success)
            list1.Add(pr.Address.ToString());
}
0
 
LVL 4

Assisted Solution

by:kjetilroe
kjetilroe earned 125 total points
ID: 20278936
Hi,

Not all computers answers to ping. If you are sitting in a windows workgroup, or domain, you can list all computers in that nettwork using this example:

http://www.codeproject.com/cs/internet/peerlister.asp
0
 
LVL 1

Author Comment

by:kvnsdr
ID: 20279341
I'll wait for some other possible solutions too...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now