解决ActiveX部件不能创建对象错误

在asp中,出现下列错误提示:


Microsoft VBScript 运行时错误 错误 '800a01ad'
ActiveX 部件不能创建对象

 
这个错误是asp组件未注册,而导致。解决方法如下:
1、如果是你自己开发的组件,请使用
   regsvr32 路径/组件.dll 进行注册。

2、可能是IIS自带的常用组件,由于系统问题、或杀毒等原因,导致组件出现问题,则请用下列两个cmd命令试一下。


regsvr32 scrrun.dll
重新注册FSO文件管理。


regsvr32 "C:/Program Files/Common Files/System/ado/msado15.dll"

重新注册ADODB.Stream组件

如果上述两法仍未解决,则可能是其它原因,不仿试试下面bat批处理代码。将下面代码复制到记事本,另存为 cmd.bat,双击运行就可以了。

 

echo 正在修复,这个过程可能需要几分钟,请稍候……
rundll32.exe advpack.dll /DelNodeRunDLL32 %systemroot%/System32/dacui.dll
rundll32.exe advpack.dll /DelNodeRunDLL32 %systemroot%/Catroot/icatalog.mdb
regsvr32 /s comcat.dll
regsvr32 /s asctrls.ocx
regsvr32 /s oleaut32.dll
regsvr32 /s shdocvw.dll /I
regsvr32 /s shdocvw.dll
regsvr32 /s browseui.dll
regsvr32 /s browseui.dll /I
regsvr32 /s msrating.dll
regsvr32 /s mlang.dll
regsvr32 /s hlink.dll
regsvr32 /s mshtml.dll
regsvr32 /s mshtmled.dll
regsvr32 /s urlmon.dll
regsvr32 /s plugin.ocx
regsvr32 /s sendmail.dll
regsvr32 /s mshtml.dll /i
regsvr32 /s scrobj.dll
regsvr32 /s corpol.dll
regsvr32 /s jscript.dll
regsvr32 /s msxml.dll
regsvr32 /s imgutil.dll
regsvr32 /s cryptext.dll
regsvr32 /s inseng.dll
regsvr32 /s iesetup.dll /i
regsvr32 /s cryptdlg.dll
regsvr32 /s actxprxy.dll
regsvr32 /s dispex.dll
regsvr32 /s occache.dll
regsvr32 /s iepeers.dll
regsvr32 /s urlmon.dll /i
regsvr32 /s cdfview.dll
regsvr32 /s webcheck.dll
regsvr32 /s mobsync.dll
regsvr32 /s pngfilt.dll
regsvr32 /s licmgr10.dll
regsvr32 /s hhctrl.ocx
regsvr32 /s inetcfg.dll
regsvr32 /s trialoc.dll
regsvr32 /s tdc.ocx
regsvr32 /s MSR2C.DLL
regsvr32 /s msident.dll
regsvr32 /s msieftp.dll
regsvr32 /s xmsconf.ocx
regsvr32 /s ils.dll
regsvr32 /s msoeacct.dll
regsvr32 /s wab32.dll
regsvr32 /s wabimp.dll
regsvr32 /s wabfind.dll
regsvr32 /s oemiglib.dll
regsvr32 /s directdb.dll
regsvr32 /s inetcomm.dll
regsvr32 /s msoe.dll
regsvr32 /s oeimport.dll
regsvr32 /s msdxm.ocx
regsvr32 /s dxmasf.dll
regsvr32 /s laprxy.dll
regsvr32 /s l3codecx.ax
regsvr32 /s acelpdec.ax
regsvr32 /s mpg4ds32.ax
regsvr32 /s danim.dll
regsvr32 /s Daxctle.ocx
regsvr32 /s lmrt.dll
regsvr32 /s datime.dll
regsvr32 /s dxtrans.dll
regsvr32 /s dxtmsft.dll
regsvr32 /s wshom.ocx
regsvr32 /s wshext.dll
regsvr32 /s vbscript.dll
regsvr32 /s scrrun.dll mstinit.exe /setup
regsvr32 /s msnsspc.dll /SspcCreateSspiReg
regsvr32 /s msapsspc.dll /SspcCreateSspiReg
echo.
echo.
echo 修复成功!任意键退出!
pause>nul
案例:

以下是无组件上传upload.asp页面的部分代码:


  Set Form = Server.CreateObject ("Scripting.Dictionary")
  Form.CompareMode = 1
  Set File = Server.CreateObject ("Scripting.Dictionary")
  File.CompareMode = 1
  'A处 
  Set tStream = Server.CreateObject ("ADODB.Stream")
  Set oUpFileStream = Server.CreateObject ("ADODB.Stream")
  'B处
整个程序以前均可用,但后来由于计算机染毒,重装系统并杀毒之后,发现这个页面程序出现

Microsoft VBScript 运行时错误 错误 '800a01ad'
ActiveX 部件不能创建对象
错误,使用

   response.write "zuoyefeng调试"
   response.end

放在A处和B处调试,发现是
 Set tStream = Server.CreateObject ("ADODB.Stream")
这块的问题。可见,是组件的问题,于是使用上面命令重注了一上,OK,问题解决了。
 

你可能感兴趣的:(ASP技术文摘)