64 位服务器中的 ASMX 到 COM 调用

ASMX to COM call in 64 bit Server

我正在尝试从 IIS 8.5 & Windows Server 2012 64 bit server 中托管的 ASMX 网络服务调用 COM 库方法(COM 互操作性)。但是呼叫没有响应。我做了以下更改以确保我们进行正确的设置

1.为应用程序池设置启用 32 位应用程序 = true

2。在以下位置注册 COM C:\Windows\System32 & C:\Windows\SysWoW64

3。尝试将 Web 服务项目编译为目标 X86 配置

4.将 Web 服务的执行超时更改为 10 分钟

5.是否设置了适用于我的 windows 应用程序的应用程序池身份

但是上面的 none 有效。

Just to verify .Net and COM communication, I have created the windows application to call the same method and it works when I compile the project in X86 platform.

If I compile the windows application to target platform to Any CPU, I get the same issue like calling it via ASMX web service. Its not responding to the call.

Finaly, It looks like it is working for windows application target x86 platform. But no idea, why it is not working from asmx service when I set Enable 32 bit application.

你能帮我确定 ASMX 到 COM 调用可能有什么问题吗?

参考:

Error 80040154 (Class not registered exception) when initializing VCProjectEngineObject (Microsoft.VisualStudio.VCProjectEngine.dll)

How to repair COMException error 80040154?

注意: 当 COM 未安装在 C:\Windows\System32 文件夹中时,我收到 COM 异常 80040154 错误。现在没有收到此错误,但调用没有响应。

服务器是 64 位

根据您调用的 COM 服务器,您可能需要 specify an Identity for an Application Pool if the COM application requires a user profile, or check the app pool's Load User Profile property. (I needed this 到 运行 ABCpdf,例如)