Server.CreateObject Failed in Classic ASP(Server.CreateObject 在经典 ASP 中失败)

本文介绍了Server.CreateObject 在经典 ASP 中失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用我需要在经典 ASP 页面中使用的一个功能创建了 ASP.NET dll.

I created the ASP.NET dll with one function that i need to use in Classic ASP page.

我使用下面的代码在经典的 asp 页面中创建对象

I used the below code for creating object in classic asp page

set PeopleSoft = server.createobject("OPS.PSL")

执行时出现以下错误

Server object error 'ASP 0177 : 80070002' 

Server.CreateObject Failed 

我在 stackoverflow 中搜索了一些解决方案.通过启用使程序集 COM 可见"和注册 COM 互操作".

I searched in stackoverflow i saw some solution. By enabling the "Make assembly COM-visible" and "Register for COM interop".

请帮助我摆脱这个问题

推荐答案

你必须先注册你的DLL,如果问题仍然存在,这样做:

You have to register your DLL first, and if the problem persists, do this:

  • 找到并单击以下注册表子项:HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerMAINFeatureControlFEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701
  • 注意如果 FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701 子项不存在,您必须手动创建它.如果您使用的是 64 位操作系统,则可能需要改用 HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftInternet ExplorerMAIN FeatureControlFEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701
  • 右键单击 FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701,指向新建,然后单击 DWORD 值
  • 键入 w3wp.exe 以命名新的注册表项,然后按 Enter.
  • 右键单击 w3wp.exe,然后单击修改.
  • 在数值数据框中,键入 1,然后单击确定.

设置此注册表项后,简单的应用程序池重启将应用更改.您的 .NET COM 组件将不再会在没有真正解决方案的情况下随机停止工作,除非改组应用程序池!

After setting this registry key, a simple app pool restart will apply the change. No longer will your .NET COM components randomly stop working with no real solution except shuffling application pools!

这篇关于Server.CreateObject 在经典 ASP 中失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!