AspPing

AspPing provides the same basic functionality as the command-line version of ping. AspPing is free but there is no free support for this free product.

To install

AspPing Installation

To use this ASP component move the DLL into a subdirectory (like \winnt\system32 for NT or \windows\system for Win95).

To register the component on the system change to the directory where you moved the DLL and type:

regsvr32 aspping.dll

Simple Ping Example

Using the component is as simple as

  1. Creating the object
  2. Setting a few properties
  3. Calling the Ping method
<%
  rem ***********************************************************
  rem * Create the object
  rem ***********************************************************
  Set Pinger = Server.CreateObject("AspPing.Conn")

  rem ***********************************************************
  rem * Set the host we'll be pinging
  rem ***********************************************************
  Pinger.RemoteHost = "www.microsoft.com"

  rem ***********************************************************
  rem * Optional count for number of times to ping remotehost
  rem * defaults to 1
  rem ***********************************************************
  Pinger.PingCount = 2


  rem ***********************************************************
  rem * Ping and then dump the results
  rem ***********************************************************
  Response.Write "<pre>" & Pinger.Ping & "</pre>"

  rem ***********************************************************
  rem * Release the object
  rem ***********************************************************
  Set Pinger = nothing

%>

AspPing Properties

AspPing Methods