简体   繁体   English

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

[英]ASMX to COM call in 64 bit Server

I am trying to call the COM library method(COM interopablity) from ASMX webservice hosted in IIS 8.5 & Windows Server 2012 64 bit server . 我正在尝试从IIS 8.5 & Windows Server 2012 64 bit server托管的ASMX Web服务调用COM库方法(COM互斥性)。 But the call doesnt respond. 但是电话没有响应。 I have done the following changes to ensure we are doing the right setup 我进行了以下更改以确保我们进行正确的设置

1. Enable 32 bit application = true for application pool setup 1.为应用程序池设置启用32位应用程序= true

2. Registered the COM in the following locations C:\\Windows\\System32 & C:\\Windows\\SysWoW64 2.在以下位置C:\\ Windows \\ System32&C:\\ Windows \\ SysWoW64中注册COM。

3. Tried compile the webservice project to target X86 configuration 3.尝试将webservice项目编译为目标X86配置

4. Changed the execution timeout for web service to 10 mins 4.将Web服务的执行超时更改为10分钟

5. Did setup application pool identity which worked for my windows application 5.是否设置了适用于Windows应用程序的应用程序池标识

But none of the above works. 但以上方法均无效。

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. 只是为了验证.Net和COM的通讯,我创建了Windows应用程序来调用相同的方法,并且在X86平台上编译项目时它可以工作。

If I compile the windows application to target platform to Any CPU, I get the same issue like calling it via ASMX web service. 如果将Windows应用程序编译为目标平台以使用任何CPU,则会遇到与通过ASMX Web服务调用相同的问题。 Its not responding to the call. 它没有响应呼叫。

Finaly, It looks like it is working for windows application target x86 platform. 最后,看来它适用于Windows应用程序目标x86平台。 But no idea, why it is not working from asmx service when I set Enable 32 bit application. 但不知道,为什么在设置“启用32位应用程序”时,它不能通过asmx服务运行。

Could you help me to identify what could be the wrong with ASMX to COM call? 您能否帮助我确定ASMX到COM调用可能出了什么问题?

Referenced: 引用:

Error 80040154 (Class not registered exception) when initializing VCProjectEngineObject (Microsoft.VisualStudio.VCProjectEngine.dll) 初始化VCProjectEngineObject(Microsoft.VisualStudio.VCProjectEngine.dll)时出现错误80040154(类未注册的异常)

How to repair COMException error 80040154? 如何修复COMException错误80040154?

Note: I was getting COM exception 80040154 error when COM was not installed on C:\\Windows\\System32 folder. 注意:未在C:\\ Windows \\ System32文件夹上安装COM时,出现COM异常80040154错误。 Now not getting this error but call not responds. 现在没有收到此错误,但呼叫没有响应。

Server is 64bit 服务器是64位的

Depending on the COM server you invoke, you may need to 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. 如果COM应用程序需要用户配置文件,则可能需要为应用程序池指定标识,具体取决于您调用的COM服务器,或者检查应用程序池的“ Load User Profile属性。 ( I needed this to run ABCpdf, for example) (例如, 我需要使用它来运行ABCpdf)

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM