檢測個人首頁網站是否支援組件的ASP工具
來源:互聯網
上載者:User
一個很有用的ASP代碼---檢測個人首頁提供網站是否支援組件
現在有很多支援ASP服務的個人首頁提供網站,但是困惑大家的一點就是
我怎麼才能夠知道該網站是否支援某些很有用的組件是否安裝,例如一些發郵件
的組件jmail,cdo,或則檢測是否支援RDS,是否支援Index Server等等,真的很
有用耶。
你所做的是只需要把下面這個檢測檔案上傳到你的個人首頁網站上,然後運行
它就可以了,呵呵,很簡單的,不用任何附加的組件哦。
偵查工具:
CheckObj.asp代碼如下:
<% @ Language="VBScript" %>
<% Option Explicit %>
<%
' 這是一些隨IIS4附帶的一些組件(預設的)
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>檢測ISP是否支援ASP組件的工具</TITLE>
</HEAD>
<BODY>
在下面的輸入框中輸入你要檢測的組件的ProgId或則ClassId.
如果你沒有輸入的話,將使用預設值。
<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>
<%