Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Pinging Computers on a local Network from ASP.NET

Reply
Thread Tools

Pinging Computers on a local Network from ASP.NET

 
 
=?Utf-8?B?RGV2aW4=?=
Guest
Posts: n/a
 
      05-26-2004
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");
}

 
Reply With Quote
 
 
 
 
=?Utf-8?B?QmluIFNvbmcsIE1DUA==?=
Guest
Posts: n/a
 
      05-26-2004
Hi

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

Bin Song, MCP
 
Reply With Quote
 
 
 
 
Raterus
Guest
Posts: n/a
 
      05-26-2004
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" <> wrote in message news:A163353E-F118-4042-BCDE-...
> 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");
> }
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pinging Network from inside ASA Lowell Yates Cisco 0 03-11-2009 07:30 PM
Pinging 1394 cable system from Network bridge Ravichandran Windows 64bit 3 05-13-2008 11:07 AM
Computers Enabled Inc - Cheap Notebook Computers KUTEATLBOI@gmail.com Computer Information 0 03-09-2006 04:42 AM
Help needed with Pinging Network from Router Jerry Cisco 5 10-27-2003 08:28 AM
Pinging Local Network Kimball K Kinnison Computer Support 9 09-29-2003 10:50 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57