473,386 Members | 1,766 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.

Problem executing programs from ASP

Hi

I am trying to execute a ping command from ASP, and I am really not getting
anywhere. I wrote the following code based on what I found on the subject on
the Internet:

Dim sh, result
Set sh = CreateObject("WScript.Shell")
cmd = "ping 192.168.1.5 -n 1 -w 200"
result = sh.Run(cmd, 1, true)
Set sh = Nothing
Set result = Nothing

When I try loading the page containin this code, however, I get no response
from the web-server. And occasionally I get an error message saying that the
server could not handle the request due to too many users. Subsequent
requests to the server, also on other files, seems to end up in the HTTP
equivalent of a black hole, that is there is no response.

I am running WinXP (which is incidentally up-to-date with regard to Windows
Update) and IIS 5.1.

I hope someone can help me with this problem.

Regards
Morten Frederiksen
Jul 19 '05 #1
6 1424
On Wed, 18 Aug 2004 10:25:56 +0200, "Morten Frederiksen"
<ma**@no.spam> wrote:
Hi

I am trying to execute a ping command from ASP, and I am really not getting
anywhere. I wrote the following code based on what I found on the subject on
the Internet:

Dim sh, result
Set sh = CreateObject("WScript.Shell")
cmd = "ping 192.168.1.5 -n 1 -w 200"
result = sh.Run(cmd, 1, true)
Set sh = Nothing
Set result = Nothing

When I try loading the page containin this code, however, I get no response
from the web-server. And occasionally I get an error message saying that the
server could not handle the request due to too many users. Subsequent
requests to the server, also on other files, seems to end up in the HTTP
equivalent of a black hole, that is there is no response.
What response are you loooking for and how do you know it isn't
working? Might want to try one of the Ping components already
available, such as:

http://www.15seconds.com/component/pg000229.htm

Jeff

I am running WinXP (which is incidentally up-to-date with regard to Windows
Update) and IIS 5.1.

I hope someone can help me with this problem.

Regards
Morten Frederiksen


Jul 19 '05 #2

"Jeff Cochran" <je*********@zina.com> skrev i en meddelelse
news:41****************@msnews.microsoft.com...
On Wed, 18 Aug 2004 10:25:56 +0200, "Morten Frederiksen"
<ma**@no.spam> wrote: What response are you loooking for and how do you know it isn't
working?
Just about any response would do! It seems that IIS hangs and there is no
response at all. The ASP code I posted is of course only the offending code;
the document contains more code and HTML, but none of it is displayed in the
browser. I just get a blank window or the "too many users" error message.
Might want to try one of the Ping components already
available, such as:

http://www.15seconds.com/component/pg000229.htm


I am familiar with that one, but still the problem puzzles me.

Regards
Morten Frederiksen
Jul 19 '05 #3
That script opens a console window, which is not allowed in ASP.

Morten Frederiksen wrote:
Hi

I am trying to execute a ping command from ASP, and I am really not
getting anywhere. I wrote the following code based on what I found on
the subject on the Internet:

Dim sh, result
Set sh = CreateObject("WScript.Shell")
cmd = "ping 192.168.1.5 -n 1 -w 200"
result = sh.Run(cmd, 1, true)
Set sh = Nothing
Set result = Nothing

When I try loading the page containin this code, however, I get no
response from the web-server. And occasionally I get an error message
saying that the server could not handle the request due to too many
users. Subsequent requests to the server, also on other files, seems
to end up in the HTTP equivalent of a black hole, that is there is no
response.

I am running WinXP (which is incidentally up-to-date with regard to
Windows Update) and IIS 5.1.

I hope someone can help me with this problem.

Regards
Morten Frederiksen


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #4
On Wed, 18 Aug 2004 14:52:16 +0200, "Morten Frederiksen"
<ma**@no.spam> wrote:

"Jeff Cochran" <je*********@zina.com> skrev i en meddelelse
news:41****************@msnews.microsoft.com...
On Wed, 18 Aug 2004 10:25:56 +0200, "Morten Frederiksen"
<ma**@no.spam> wrote:

What response are you loooking for and how do you know it isn't
working?


Just about any response would do! It seems that IIS hangs and there is no
response at all. The ASP code I posted is of course only the offending code;
the document contains more code and HTML, but none of it is displayed in the
browser. I just get a blank window or the "too many users" error message.
Might want to try one of the Ping components already
available, such as:

http://www.15seconds.com/component/pg000229.htm


I am familiar with that one, but still the problem puzzles me.


If you sat at the server you'd understand. The script, as written,
can't retrun anything to a browser. It opens a DOS console on the
server, which doesn't work, and everything is performed on the server.
No response will go back to the client.

That's why the component exists... :)

Jeff
Jul 19 '05 #5
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> skrev i en meddelelse
news:e9**************@TK2MSFTNGP11.phx.gbl...
That script opens a console window, which is not allowed in ASP.


OK. I have tried using the Exec method instead, but that results in the same
problem. Does the Exec method also open a window?

But should this error really make the server hang?

Regard
Morten Frederiksen
Jul 19 '05 #6
Morten Frederiksen wrote:
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> skrev i en meddelelse
news:e9**************@TK2MSFTNGP11.phx.gbl...
That script opens a console window, which is not allowed in ASP.


OK. I have tried using the Exec method instead, but that results in
the same problem. Does the Exec method also open a window?

Try it in a vbs file and see.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #7

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

Similar topics

3
by: Al Christians | last post by:
I started having some problems running python programs (python 2.3) from the Win2k command line. I would get crashes with an NTVDM error. Even just executing python would cause it. I upgraded to...
12
by: SJD | last post by:
I've just read Christoph Schittko's article on XmlSerializer: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlnet/html/trblshtxsd.asp . . . and very informative it is too....
2
by: Rhino | last post by:
I am getting an sqlcode of -927 when I execute SQL within a COBOL stored procedure in DB2 OS/390 Version 6 on OS/390. I have looked at the error message for that condition and tried everything I...
15
by: Chakkaradeep | last post by:
Hi all, i have written a Service,now i want to execute another application (for eg;calc.exe) in the service....how will i perform it??... i tried using this.... /**************Executing a...
1
by: Charles | last post by:
I'm trying to write a windows application in C# (Using Microsoft Visual C# 2005 Express) that is nothing more than a simple UI with buttons on it. The buttons do various things like running...
2
by: Joseph Geretz | last post by:
I'm having a credentialing problem in my web application. Actually, I don't think this is an IIS security issue, since I'm able to access the page I'm requesting. However, the executing page itself...
0
by: Fiona McBride | last post by:
Hi all, I have a really odd problem with some Visual Basic .NET 2003 code; I have a program that creates a number of windows which contain RichTextBox, Timers (disabled) and menus. The code...
2
by: Tim | last post by:
I am trying to send a simple mail message using windows forms in VB.NET 2005. When executing the code, I get a general 'Configuration system failed to initialize' error message when the code...
81
by: =?utf-8?B?4piG4piG4piG4piG4piGIFPDvCBLZWl0aCBDaGFr | last post by:
Installed this compiler on Vista; a simple "hello world" after compiled and run would pop-up a window "source file not compiled" I've seen this question asked a few times on Internet groups and...
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:
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.