473,386 Members | 1,819 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,386 software developers and data experts.

Ping server

Hi all,

I want to ping or try to check the avability of a local server. Is
there any way to do it directly from an ASP page just by pressing a
buttun? I just want to do the "ping" command direcdry from an ASP page!

Thanks,

Shai

Mar 19 '06 #1
3 4245
wrote on 19 mrt 2006 in microsoft.public.inetserver.asp.general:
I want to ping or try to check the avability of a local server. Is
there any way to do it directly from an ASP page just by pressing a
buttun? I just want to do the "ping" command direcdry from an ASP page!


<http://www.4guysfromrolla.com/webtech/102998-1.shtml>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Mar 19 '06 #2
wrote on 19 mrt 2006 in microsoft.public.inetserver.asp.general:

I want to ping or try to check the avability of a local server. Is
there any way to do it directly from an ASP page just by pressing a
buttun? I just want to do the "ping" command direcdry from an ASP page!

<http://www.4guysfromrolla.com/webtech/102998-1.shtml>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Evertjan,

Thanks from your quick replay but it still doesn't work. my doping.bat
file:
ping -a %1 > D:\ccadmin\wwwroot\IT\servers%2.txt
My asp file:
<%

Set FileSys = Server.CreateObject("Scripting.FileSystemObject")
FileName = FileSys.GetTempName

Set WShShell = Server.CreateObject("WScript.Shell")

IP = "w2k-ccadmin" ' or whatever you want to ping
RetCode = WShShell.Run("D:\ccadmin\wwwroot\IT\servers\DoPing .bat " & IP
& " " & FileName, 1, True)

if RetCode = 0 Then

'There were no errors

else

Response.Redirect "PingErrors.htm"

end if
Set TextFile = FileSys.OpenTextFile("D:\ccadmin\wwwroot\IT\server s\" &
FileName & ".txt", 1)
TextBuffer = TextFile.ReadAll

For i = 1 to Len(TextBuffer)

If Mid(TextBuffer,i,1) = chr(13) Then

Response.Write("<BR>")

else

Response.Write(Mid(TextBuffer,i,1))

end if

Next

TextFile.Close

FileSys.DeleteFile "D:\ccadmin\wwwroot\IT\servers\" & FileName & ".txt"

%>

"D:\ccadmin\wwwroot\IT\servers\" is the location of the files at the
server i'm working with. I've also checked and the object "RetCode"
equels 1- the reason i'm reaching "PingErrors.htm" each time i'm trying
to activate the asp file .

Thanks,

Shai

Mar 19 '06 #3
wrote on 19 mrt 2006 in microsoft.public.inetserver.asp.general:
wrote on 19 mrt 2006 in microsoft.public.inetserver.asp.general:

I want to ping or try to check the avability of a local server. Is
there any way to do it directly from an ASP page just by pressing a
buttun? I just want to do the "ping" command direcdry from an ASP page!

<http://www.4guysfromrolla.com/webtech/102998-1.shtml>

Thanks from your quick replay but it still doesn't work.


Not my piece of cake.

Usually it is a folder rights problem, like write access or run access.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Mar 19 '06 #4

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

Similar topics

14
by: Alexandre Plennevaux | last post by:
hello ! I would like to measure the time a user needs to connect to my website. In other words, to perform a ping between my website and the user's computer. I'm scratching my head as to how...
0
by: Sleiman | last post by:
Hello newsgroup readers I am looking for a php implementation for xmlrpc ping server. Do you have any idea where I can find one? Using mod_pubsub I can have a very nice blogchatter style of...
4
by: Tim Marshall | last post by:
Originally posted with Comp.lang.php spelt stupidly incorrectly. Please accept my apologies for the resultant multi-post.... Hi, I'm cross posting to comp.infosystems.www.authoring.html and...
2
by: David Lozzi | last post by:
I need to determine from ASP if the database server is up and running, and if it isn't ping another database server. I posted this before about a different client, and I was told to request a file...
3
by: Jason Rodman | last post by:
I have downloaded every example on how to create a ping utility in .Net in both VB and C#, but have been disappointed with the results. I have YET to find an example that returns consistent results...
14
by: Egil Hansen | last post by:
Hi I'm wondering if its possible to write a javascript, that can ping a ip and return the average round trip time (like ping in dos/linux)? Regards, Egil.
13
by: Adam | last post by:
Hi! I'm trying to write a small application for an online gaming site (flight sims), where people can add their local server to a list. Basically, I just need to be able to loop/ping each...
2
by: Devin | last post by:
I am trying to figure out a way to ping IP address. This is because we assign all of our IP address in house, and when we are assigning a new one, we wish to verify that it is not already in use....
1
by: John | last post by:
When I ping my server over the internet connection and the server isn't responding due to the connection not working properly is it possible in .Net to reconnect the connection if the ping is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.