本機調試
1、重新啟動www服務
2、重建dll
伺服器註冊
1、手工註冊DLL ,非常遺憾要重新啟動伺服器
regsvr32 RHasp.dll
反註冊
regsvr32 /u RHasp.dll
2、另外還有一個方法可以不重新啟動伺服器
使用MTS(Microsoft Transaction Server)
MTS是IIS 4新增特色,但是它提供了巨大的改進。MTS允許你指定只有有特權的用
戶才能夠 訪問組件,大大提高了網站伺服器上的安全性設定。在MTS上註冊組件的步驟如下:
(1) 開啟IIS管理主控台。
(2) 展開transaction server,按右鍵"pkgs installed"然後選擇"new package"
(3) 單擊"create an empty package"
(4) 給該包命名
(5) 指定administrator帳號或則使用"interactive"(如果伺服器經常是使用administrator 登陸的話)
(6) 現在使用按右鍵你剛建立的那個包下面展開後的"components"。選擇 "new then component"
(7) 選擇 "install new component"
(8) 找到你的.dll檔案然後選擇next到完成。
要刪除這個對象,只要選擇它的表徵圖,然後選擇delete.
參考例子
<%
‘調用的時候 server.createobject("工程名.類名")
set RHasp = server.CreateObject("RHasp.Functions")
RHasp.PrintInfo()
set RHasp = nothing
%>'**********************************************
Private myScriptingcontext As ScriptingContext
Private myApplication As Application
Private myRequest As Request
Private myResponse As Response
Private myServer As Server
Private mySession As Session
'**********************************************
'*****************************************************************
Public Sub OnStartPage(passedscriptingcontext As ScriptingContext)
Set myScriptingcontext = passedscriptingcontext
Set myApplication = myScriptingcontext.Application
Set myRequest = myScriptingcontext.Request
Set myResponse = myScriptingcontext.Response
Set myServer = myScriptingcontext.Server
Set mySession = myScriptingcontext.Session
End Sub
'*****************************************************************
'*********************************
Public Sub OnEndPage()
Set myScriptingcontext = Nothing
Set myApplication = Nothing
Set myRequest = Nothing
Set myResponse = Nothing
Set myServer = Nothing
Set mySession = Nothing
End Sub
'********************************
Public Sub PrintInfo()
myResponse.Write ("目前時間:" & Now())
End Sub