473,320 Members | 2,202 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Pinging using ASP.Net

Using ASP.Net I need to find out if a particular server is
up and running. I know the IP Address and name of the
server. Its something similar to ping command but I need
to have it at the click of a button for some reason. All I
need to know is if the server is running.

Any help is greatly appreciated.

Pepsi
Nov 17 '05 #1
2 1909
try this, shows you how to do it via sockets in a simple web service, from
there its easy to wrap an asp.net page around it

http://www.411asp.net/home/tutorial/...workf/pingfunc

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------

"pepsi" <pi****@hotmail.com> wrote in message
news:01****************************@phx.gbl...
Using ASP.Net I need to find out if a particular server is
up and running. I know the IP Address and name of the
server. Its something similar to ping command but I need
to have it at the click of a button for some reason. All I
need to know is if the server is running.

Any help is greatly appreciated.

Pepsi

Nov 17 '05 #2
You can import System.Net and do something like this in
the click event of your button:

Dim server As String = "207.46.134.222"

Try
Dim hostInfo As IPHostEntry = Dns.GetHostByAddress(server)
Catch ex As Exception
Response.Write("OFF, host turned off")
End Try

-----Original Message-----
Using ASP.Net I need to find out if a particular server isup and running. I know the IP Address and name of the
server. Its something similar to ping command but I need
to have it at the click of a button for some reason. All Ineed to know is if the server is running.

Any help is greatly appreciated.

Pepsi
.

Nov 17 '05 #3

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

Similar topics

4
by: M.N.A.Smadi | last post by:
hi; I need a simple script to run the ping command with some parameters and be able to read the return value of the ping function. Any pointers will be appreciated thanks m.smadi
2
by: HMS Surprise | last post by:
Greetings, Perhaps this question should be posted to a web-development group and if so feel free to blast me. However I am a c/c++ developer that needs to pull some data across the net and...
8
by: Thomas Dybdahl Ahle | last post by:
Hi, I've writing a python application in which I'd like to have a small "ping label", to always tell the current ping time to the server. It seems however that I have to be root to send those...
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: patelxxx | last post by:
Which Protocol do I use, when 'Pinging a server'? I am going to set up a Server status area on our companys website (sits on server A), the PERL coding will PING two other servers (server B & C)...
2
by: gzali | last post by:
i am facing the problem that my live ip server is not pinging on my system i am using wireless connection pionts and the server pinging on some systems not all including me.when i m pinging server...
2
by: =?Utf-8?B?VG9kZA==?= | last post by:
Hello I'm using the following script to try and ping: <% Response.Buffer = true %> <% url = "www.espn.com" Set objWShell = CreateObject("WScript.Shell") Set objCmd = objWShell.Exec("ping " &...
3
by: Prasanth | last post by:
I tried pinging a machine from python using socket programming but could not do it. Is there any module which we can use to ping the machine < like net::ping in perlor can you give me simple...
1
by: sidd4one | last post by:
Hello, Hi experts when iam pinging from one of my system in the network. Its show iam "Unable to contact to ip adddress".This is message iam ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.