Personal Homepage | site | Support component A very useful ASP code---Detect a personal home page provide a site to support components
There are many personal home pages that support ASP services, but the point of confusion is
How can I know if the site supports some very useful components for installation, such as some email
Component Jmail,cdo, or whether to detect support for RDS, whether or not to support the index server, and so on, really
Useful, yes.
All you have to do is upload the following test file to your home page and run
It can be, oh, very simple, without any additional components oh.
Detection tools:
The checkobj.asp code is as follows:
<% @ language= "VBScript"%>
<% 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> not installed, this homepage provides the site 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> not installed, this homepage provides the site 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>
I provide this tool is to want you to make your homepage better, to make full use of
Your personal homepage site is available for your component to make a higher level of ASP home page out.
Good luck.