2

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. 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

2. Registered the COM in the following locations C:\Windows\System32 & C:\Windows\SysWoW64

3. Tried compile the webservice project to target X86 configuration

4. Changed the execution timeout for web service to 10 mins

5. Did setup application pool identity which worked for my windows application

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.

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.

Could you help me to identify what could be the wrong with ASMX to COM call?

Referenced:

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

How to repair COMException error 80040154?

Note: I was getting COM exception 80040154 error when COM was not installed on C:\Windows\System32 folder. Now not getting this error but call not responds.

Server is 64bit

Community
  • 1
  • 1
Billa
  • 5,226
  • 23
  • 61
  • 105

1 Answers1

2

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. (I needed this to run ABCpdf, for example)

devio
  • 36,858
  • 7
  • 80
  • 143
  • Yes. I did setup the application pool identity as you mentioned. I used my windows logon credentials that worked for running the windows application x86 platform build in application pool identity setup. – Billa Mar 29 '16 at 09:27
  • Wow!! Great you saved my day :) It worked after setting Load User Profile true :) Cheers. – Billa Mar 29 '16 at 09:56