无法在经典 ASP/VBScript 页面中实例化 .Net COM 对象(错误 ASP 0177)
我使用 .Net 3.5 在 C# 中编写了一个支持 COM 互操作的类库。该对象旨在为经典 ASP 页面提供一些实用功能。我编写了一个 test.asp 页面,它实例化所需的对象并调用其方法。在我的机器上运行良好。
在另一台计算机(Windows Server 2003 - 标准版)上,即使程序集正确注册了 regasm,它也无法工作。我检查了注册表,据我所知,它看起来没问题。
我收到的错误是“ASP 0177”(错误代码)、“8000ffff; Server.CreateObject-Fehler”(错误描述),它转换为 Server.CreateObject-Error。
顺便提一句。该程序集已签名,并且没有任何其他自定义构建程序集作为依赖项(仅是系统内容)。
有人经历过类似的事情吗?
I've written a COM interop enabled class-library in C# using .Net 3.5. The object is meant to provide some utility functions for classic ASP pages. I've written a test.asp page which instanciates the desired object and calls its methods. Works fine on my machine.
On a different machine (Windows Server 2003 - Standard Edition) it doesn't work eventhough the assembly is registered with regasm correctly. I've checked the regedit and afaik it looks ok.
The error I'm getting is "ASP 0177" (error code), "8000ffff; Server.CreateObject-Fehler" (error description) which translates to Server.CreateObject-Error.
Btw. the assembly is signed and doesn't have any other custom build assemblies as dependencies (just the system stuff).
Did anyone experience something similar?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
授予 IUSR 用户(或您的 IIS 用户)对以下注册表项的读取访问权限为我完成了这项工作并解决了问题。
Granting the IUSR user (or whoever your IIS user is) read-access to the following Registry Key did the job for me and fixed the Problem.
我认为这是一个安全问题。看来您已经在自己的电脑上开发和测试了该组件,这与服务器(例如安装了 Visual Studio)相比有很多差异。
编辑:请查看此 Microsoft“修补程序修补程序”:
I think it's a security issue. It seems you had developed and tested the component in your own pc, which have a lot of differences compared to a server (having visual studio installed by example).
EDIT: Please take a look at this Microsoft "Hotfixes a hotfix":
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\
FeatureControl\FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701
指向“新建”,然后单击“DWORD 值
设置此注册表项后,简单的应用程序池重新启动即可应用更改。除了重新排列应用程序池之外,您的 .NET COM 组件将不再随机停止工作而没有真正的解决方案!
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\
FeatureControl\FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701
point to New, and then click DWORD Value
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!