本站首页
音乐欣赏
古代书法
山人书法
乐园论坛
叶国伦曲
MIDI音乐
上传MIDI
历代书论
古代篆书
古代隶书
古代魏书
古代楷书
古代行书
古代草书
篆书
隶书
魏书
楷书
行书
草书
欢迎光临诗书乐园网站!
诗书乐园新网址1(pcmusic.eicp.top:58897)
诗书乐园新网址2(25x29087k7.wicp.vip)
;
栏目导航
首页
>>
ASP技术
>>
ASP资料
首页
作者
管理员
发表时间
2012-04-10 19:17:46
总浏览次数
36
回到上页
[转帖]检测ISP是否支持ASP组件的代码
检
测
I
S
P
是
否
支
持
A
S
P
组
件
的
代
码
<%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>
<%
Dim strClass
strClass = Trim(Request.Form("classname"))
If "" <> strClass then
Response.Write strClass & " "
If Not IsObjInstalled(strClass) then
Response.Write "<strong>本主页提供站点不支持这个组件</strong>"
Else
Response.Write "安装了,本主页提供站点支持使用这个组件!"
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>本主页提供站点不支持这个组件</strong>"
Else
Response.Write "安装了,本主页提供站点支持使用这个组件!"
End If
Response.Write "</TD></TR>" & vbCrLf
Next
%>
</TABLE>
<%
End If
%>
</BODY>
</HTML>
评论文章
回到上页
发表回复
标 题
*
回 者
*
Email
来 自
文 件
(可上传jpg,gif,tif,mid,doc,xls,htm,rar,mdi,zip,txt文件)
内容*
回到上页
关于我们
联系我们
Copyright ©
诗书乐园
All Rights Reserved
地址 广东省河源市和平县 Email
pcmusic1000@163.com