简体   繁体   English

尝试实例化经典ASP中的COM对象时间歇性出现0x80070002错误

[英]Getting 0x80070002 error intermittently when trying to instantiate a COM object in classic ASP

We have a classic ASP page that is instantiating a .Net object through a COM interface. 我们有一个经典的ASP页面,该页面通过COM接口实例化.Net对象。 It was working fine for a long time, but over the weekend we applied some Windows updates and it is no longer working reliably in our production environment. 长期以来,它运行良好,但是在周末我们应用了Windows更新,因此在生产环境中不再可靠运行。 Sometimes it works, sometimes it doesn't and it seems random when it works. 有时它起作用,有时却不起作用,并且似乎起作用时是随机的。 It doesn't fail in a test environment or even on the production servers when we take them out of the cluster (seems to only fail under load). 当我们将它们从群集中移出时,它在测试环境甚至生产服务器上都不会失败(似乎只能在负载下失败)。

The error is "-2147024894 - File or assembly name FusionEngine, or one of its dependencies, was not found." 错误为“ -2147024894-找不到文件或程序集名称FusionEngine或其依赖项之一”。 The number converted to hex is 80070002. 转换为十六进制的数字是80070002。

We created a test page that is pretty basic. 我们创建了一个非常基本的测试页面。 It basically just instantiates the object and calls a simple property on it to display. 它基本上只是实例化该对象并在其上调用一个简单的属性以进行显示。

<%
On Error Resume Next
set oFusion = Server.CreateObject("Fusion.Engine")
%>
Error: <%=err.Number%> - <%=err.Description%><br>
[<%=oFusion.DPI%>]<br>

We tried recreating the object if an error was detected (10 times with a 1 second interval) but if it doesn't work once, it doesn't work 10 times either. 如果检测到错误(以1秒为间隔的10次),我们尝试重新创建对象,但是如果一次都不起作用,则也不会重复10次。

The fusion object is very simple. 融合对象非常简单。 It only references System.dll and System.Drawing.dll (it generates images). 它仅引用System.dll和System.Drawing.dll(它生成图像)。

The problem turned out to be that we were running two different versions of .Net (1.1 and 2.0). 问题出在我们运行的是两个不同版本的.Net(1.1和2.0)。 We were able to get it to work by making sure that they were running under different application pools. 通过确保它们在不同的应用程序池下运行,我们能够使其正常运行。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 dll与注册时不在同一路径时发生错误(0x80070002) - Error (0x80070002) when dll is not in the same path from registration 在VS 2015 Community Edition中创建新的.Net Core项目时出现0x80070002错误 - 0x80070002 Error when creating a new .Net Core project in VS 2015 Community Edition [Wix Bundle托管引导程序]错误0x80070002:无法创建托管引导程序 - [Wix Bundle Managed Bootstrapper]Error 0x80070002: Failed to create the managed bootstrapper application 从COM .dll中获取错误&#39;80070002&#39; - Getting error '80070002' from COM .dll VSTO错误System.IO.FileNotFoundException:系统找不到指定的文件。 (来自HRESULT的异常:0x80070002) - VSTO Error System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002) 如何修复 Visual Studio 中的“系统找不到指定的文件。(HRESULT 异常:0X80070002)”错误? - How to fix the "The system cannot find the file specified. (Exception from HRESULT:0X80070002)" error in Visual Studio? 该系统找不到指定的文件。 (来自HRESULT的异常:0x80070002) - The system cannot find the file specified. (Exception from HRESULT: 0x80070002) 软件包管理器&gt;系统找不到指定的文件。 (来自HRESULT的异常:0x80070002) - Package Manager > The system cannot find the file specified. (Exception from HRESULT: 0x80070002) 无法在经典ASP / VBScript页面中实现.Net COM对象(错误ASP 0177) - Cannot instanciate .Net COM object in classic ASP/VBScript page (Error ASP 0177) 不能从ASP Classic使用.NET COM +对象 - .NET COM+ Object can't be used from ASP Classic
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM