473,464 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Pinging Computers on a local Network from ASP.NET

I need a way to ping an IP address from an ASP.NET page to verify that it is not in use. This is one example given to me earlier, but unfortunetly I do not know C#. Could someone translate this into VB for me? or perhaps know of another way to easily ping an IP from an ASP.NET page.

Thanks Devin

Found at http://www.asp.net/ControlGallery/Co...069&tabindex=2

PingClient client = new PingClient();

PingReply reply = client.Ping("www.example.com");

if (reply.Success)
{
string message = "Reply took " + reply.Time + " milliseconds");
}

Nov 18 '05 #1
2 1798
Hi

Please check this article
Emulate Ping Functionalit
http://www.ftponline.com/vsm/2002_03...s/qa/page2.asp

Bin Song, MCP
Nov 18 '05 #2
You don't have to be a rocket scientist to translate from C# to VB.net, c'mon the code you posted is all to easy, just look at it!
PingClient client = new PingClient(); 'this is obviously a declaration, so in vb.net
Dim client as PingClient = new PingClient
PingReply reply = client.Ping("www.example.com"); 'Here is another declaration
Dim reply as PingReplay = client.Ping("www.example.com")

'Please tell me you know how to make an if statement
if reply.success = true then
message = "Reply took " & reply.Time & " milliseconds")
end if

??? just confused that you couldn't figure that out for yourself...am I missing something?
--Michael

"Devin" <an*******@discussions.microsoft.com> wrote in message news:A1**********************************@microsof t.com... I need a way to ping an IP address from an ASP.NET page to verify that it is not in use. This is one example given to me earlier, but unfortunetly I do not know C#. Could someone translate this into VB for me? or perhaps know of another way to easily ping an IP from an ASP.NET page.

Thanks Devin

Found at http://www.asp.net/ControlGallery/Co...069&tabindex=2

PingClient client = new PingClient();

PingReply reply = client.Ping("www.example.com");

if (reply.Success)
{
string message = "Reply took " + reply.Time + " milliseconds");
}

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: MHenry | last post by:
Hi, We were going merrily along for 6 years using this database to record all client checks that came into our office, including information about what the checks were for. Suddenly, network...
4
by: Ram Baruch | last post by:
Hi, I'm looking for a simple directory picker. I need both local drives directories and directories in the computers in the network neighborhood. Does anyone know if there is something ready in...
3
by: zav | last post by:
Hi all. Getting stright to the point Im trying to get and set my computers workgroup name but im having litle luck, i've tryed: Environment.UserDomainName Environment.MachineName but they...
1
by: nethajireddy | last post by:
Hello techies In my office network all pc's are pinging and only two pc's let named as A and B, other are c,d.... if we ping A to B or B to A the result is "request time...
2
by: =?Utf-8?B?RmVybmlr?= | last post by:
Hi, I need to get a list of the computers in my WorkGroup LAN, with its names in a similar way you get the available Drives from a PC with DriveInfo.GetDrives(). Is there a managed class that...
11
by: jellychai | last post by:
I'm doing the final year project that related to the SNMP. I need to find the solution for the IP auto detection in C#. When I run the main project, the program can automatically detect the IP for...
17
by: John Salerno | last post by:
Let me see if this question even makes sense...I'm reading Core Python Programming and I jumped ahead to the more specific topics like network programming. I plan to follow along with the example...
6
by: belias | last post by:
So...here we go. I'm having an issue with one computer on a network not being able to ping other computers by name. I've spent the last day searching similar issues and I've tried all the steps...
24
by: Asja | last post by:
I have written an application that runs in a kind of peer-to-peer framework. Servers connect to a masterserver, which a client then queries to receive a list of servers. The client selects a server...
8
Plater
by: Plater | last post by:
I hope I can explain this correctly. BACKGROUND: My office has a local network. We use a windows server 2003(small business server i think) computer to handle our domain. So all of our employees...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.