Solved

networked computers

Posted on 2004-09-02
4
204 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
asp.net bundle 8 36
C# Problem Solving Execerscise 5 42
Data Saving(2) 2 28
How to Get total minutes between two hours 4 27
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

18 Experts available now in Live!

Get 1:1 Help Now