windsurfer
Perch
AspPing seems to return nothing but null strings. I have verified that the object was created because I can set and read the RemoteHost property. But when I ping, the result is null. Does anyone have any experience with this?
ServerObjects offers no support for this component and I have read similar complaints on other BBs.
Here is usage example:
function pingit(host)
rem ***********************************************************
rem * Create temporary variable
rem ***********************************************************
dim ping1
rem ***********************************************************
rem * Create the object
rem ***********************************************************
Set Pinger = Server.CreateObject("AspPing.Conn")
rem ***********************************************************
rem * Set the host we'll be pinging
rem ***********************************************************
Pinger.RemoteHost = host
'Pinger.RemoteHost = "www.microsoft.com"
Response.Write "Pinging: " & Pinger.RemoteHost & "<br>"
rem ***********************************************************
rem * Optional count for number of times to ping remotehost
rem * defaults to 1
rem ***********************************************************
Pinger.PingCount = 2
rem ***********************************************************
rem * Ping and then set the results
rem ***********************************************************
ping1 = Pinger.Ping
Response.Write "Ping Test: <pre>" & ping1 & "</pre>"
rem ***********************************************************
rem * Release the object
rem ***********************************************************
Set Pinger = nothing
rem ***********************************************************
rem * Set the return value and leave
rem ***********************************************************
pingit = ping1
end function
ServerObjects offers no support for this component and I have read similar complaints on other BBs.
Here is usage example:
function pingit(host)
rem ***********************************************************
rem * Create temporary variable
rem ***********************************************************
dim ping1
rem ***********************************************************
rem * Create the object
rem ***********************************************************
Set Pinger = Server.CreateObject("AspPing.Conn")
rem ***********************************************************
rem * Set the host we'll be pinging
rem ***********************************************************
Pinger.RemoteHost = host
'Pinger.RemoteHost = "www.microsoft.com"
Response.Write "Pinging: " & Pinger.RemoteHost & "<br>"
rem ***********************************************************
rem * Optional count for number of times to ping remotehost
rem * defaults to 1
rem ***********************************************************
Pinger.PingCount = 2
rem ***********************************************************
rem * Ping and then set the results
rem ***********************************************************
ping1 = Pinger.Ping
Response.Write "Ping Test: <pre>" & ping1 & "</pre>"
rem ***********************************************************
rem * Release the object
rem ***********************************************************
Set Pinger = nothing
rem ***********************************************************
rem * Set the return value and leave
rem ***********************************************************
pingit = ping1
end function