<%option explicit%>
<%
' This is some of the components that came with IIS4 (default)
Dim Theinstalledobjects (8)
Theinstalledobjects (0) = "MSWC." AdRotator "
Theinstalledobjects (1) = "MSWC." BrowserType "
Theinstalledobjects (2) = "MSWC." Nextlink "
Theinstalledobjects (3) = "MSWC." Tools "
Theinstalledobjects (4) = "MSWC." Status "
Theinstalledobjects (5) = "MSWC." Counters "
Theinstalledobjects (6) = "Iissample.contentrotator"
Theinstalledobjects (7) = "Iissample.pagecounter"
Theinstalledobjects (8) = "MSWC." PermissionChecker "
Function isobjinstalled (strclassstring)
On Error Resume Next
isobjinstalled = False
ERR = 0
Dim Xtestobj
Set xtestobj = Server.CreateObject (strclassstring)
If 0 = Err Then isobjinstalled = True
Set xtestobj = Nothing
ERR = 0
End Function
%>
<HTML>
<HEAD>
<TITLE> tools to detect whether your ISP supports ASP components </TITLE>
</HEAD>
<BODY>
Enter the ProgID or ClassID of the component you want to test in the following input box.
If you do not enter, the default value will be used.
<form action=<%=request.servervariables ("Script_name")%> method=post>
<input type=text value= "" Name= "classname" size=40>
<input Type=submit value=submit>
<input Type=reset value=reset>
</FORM>
<%
Dim strclass
strclass = Trim (Request.Form ("classname"))
If "" <> strclass Then
Response.Write Strclass & ""
If not isobjinstalled (strclass) Then
Response.Write "<strong> This homepage provides a site that does not support this component </strong>"
Else
Response.Write "installed, this homepage provides site support to use this component!"
End If
Response.Write "<P>" & VbCrLf
Else
%>
<table border=0>
<%
Dim I
For i=0 to UBound (theinstalledobjects)
Response.Write "<TR><TD>" & Theinstalledobjects (i) & "</TD><TD>"
If not isobjinstalled (theinstalledobjects (i)) Then
Response.Write "<strong> This homepage provides a site that does not support this component </strong>"
Else
Response.Write "installed, this homepage provides site support to use this component!"
End If
Response.Write "</TD></TR>" & VbCrLf
Next
%>
</TABLE>
<%
End If
%>
</BODY>
</HTML>