server.createobject失败???????
我做了个dll组件在asp页面里调用,
<html>
<head>
<title>测试ActiveX DLL</title>
</head>
<body>
<%
Dim testme
set testme=server.createobject("first.test")
testme.HelloWorld
set testme=nothing
%>
</body>
</html>
------------------------------------------------------
dll代码是:
Option Explicit
'对象的声明
Dim rp As Response
Dim rq As Request
Dim ap As Application
Dim sr As Server
Dim sn As Session
'当组件被创建的时候会触发这个事件
Public Sub OnStartPage()
Dim mysc As ScriptingContext
'进行对象的实例化
Set rp = mysc.Response
Set rq = mysc.Request
Set sr = mysc.Server
Set ap = mysc.Application
Set sn = mysc.Session
rp.Write "<br>ActiveX DLL组件已经被创建了!<br>"
End Sub
'当组件被销毁的时候触发这个事件
Public Sub OnEndPage()
rp.Write "<br>ActiveX DLL组件已经被销毁!<br>"
'销毁对象
Set rp = Nothing
Set rq = Nothing
Set sr = Nothing
Set ap = Nothing
Set sn = Nothing
End Sub
'定义我们自己的一个组件方法
Public Sub HelloWorld()
rp.Write "<H1>Hello,World!</H1>"
End Sub
------------------------------------------------------------------
编译dll成功,
然后在页面里调用
出现了server.createobject失败
请问高手怎么解决这个问题呢?