Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

networked computers

Posted on 2004-09-02
4
Medium Priority
?
211 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

719 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