Solved

networked computers

Posted on 2004-09-02
4
206 Views
Last Modified: 2010-04-15
I'd like to display on a webpage a list of computers and what IP address they are at. so maybe display  a list of computers in the subrange of 10.1.1.*

so loop through 255 ip's ping or lookup or however it is you do it and see if that ip address is open or not.

Anyone have some suggestions on how to do this?
0
Comment
Question by:jayrod
  • 2
4 Comments
 
LVL 4

Expert Comment

by:somnatic
ID: 11963793
here you can find a ping utility for C# code ..
http://www.c-sharpcorner.com/network/ping.asp

0
 
LVL 3

Author Comment

by:jayrod
ID: 11965241
I guess I need to know how to resolve the IP first?  cause I won't have the host name till later
0
 
LVL 8

Accepted Solution

by:
vinhnl earned 500 total points
ID: 11965579
hi Jay,

try this code:

// store list of computers
ArrayList computers = new ArrayList();

// get computer list
for(int i = 1; i<256; i++)
{
    try
    {
        IPHostEntry hostentry = Dns.GetHostByAddress(new IPAddress(new byte[]{10,1,1,1}));
        computers.Add(hostentry.HostName);
    }
    catch{};//fail
}

Good Luck,
VINHNL
0
 
LVL 3

Author Comment

by:jayrod
ID: 11966338
that code doesn't work.. and I'm not following how it's itterating through the addresses?
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Run time Error 4 47
Code works but it's slow 28 70
Set value of dynamically created checkboxlist 2 33
What can cause the styling on a .NET site to not be found? 17 25
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

772 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