spperry2k5
IS-IT--Management
Hello,
I am currently in the process of trying to write a program that, once a user accesses my ASP page, the page queries a series of IP addresses and sends the user to the first available listening IP. I am using PortQry v2 from Microsoft, and it all seems to work well. PortQry should be sending a result back of 0 for listening, 1 for not listening, but when the application executes, it only returns an Ok (I've tested it out in my code to find out what my variable ends up with).
Is there a way to get ASPExec to send back the result given to me by PortQry, instead of just setting my various to "Ok"? I've put the code below -- maybe it's something I'm doing.
Thanks in advance.
Scott
dim Listener 'Listen stores the return from PortQrt (0=Listening, 1=Not Listening)
dim TailIP 'TailIP stores the last number of the IP address.
Function PortQry (TailIP)
Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = "c:\portqryv2\PortQry.exe -nr -n 160.131.91." & TailIP & " -q"
Listener = Executor.ExecuteWinApp
'Response.Write ("The result of this call was:" & Listener & "<br>")
End Function
TailIP = 70
While TailIP >= 70
Listener = PortQry(TailIP)
if Listener = 0 then Response.Redirect(" & TailIP & "/HomeSafeNet")
if TailIP = 76 then TailIP=69 else tailIP = TailIP + 1
wend
'Response.Redirect ("
I am currently in the process of trying to write a program that, once a user accesses my ASP page, the page queries a series of IP addresses and sends the user to the first available listening IP. I am using PortQry v2 from Microsoft, and it all seems to work well. PortQry should be sending a result back of 0 for listening, 1 for not listening, but when the application executes, it only returns an Ok (I've tested it out in my code to find out what my variable ends up with).
Is there a way to get ASPExec to send back the result given to me by PortQry, instead of just setting my various to "Ok"? I've put the code below -- maybe it's something I'm doing.
Thanks in advance.
Scott
dim Listener 'Listen stores the return from PortQrt (0=Listening, 1=Not Listening)
dim TailIP 'TailIP stores the last number of the IP address.
Function PortQry (TailIP)
Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = "c:\portqryv2\PortQry.exe -nr -n 160.131.91." & TailIP & " -q"
Listener = Executor.ExecuteWinApp
'Response.Write ("The result of this call was:" & Listener & "<br>")
End Function
TailIP = 70
While TailIP >= 70
Listener = PortQry(TailIP)
if Listener = 0 then Response.Redirect(" & TailIP & "/HomeSafeNet")
if TailIP = 76 then TailIP=69 else tailIP = TailIP + 1
wend
'Response.Redirect ("