Question

This issue is driving me crazy. I have a WCF service that uses a COM .dll (which is located in SysWOW64) to do some operations. I registered it with Windows 2008 R2 but it doensn't work when the service is deployed on the server. My service is compiled for "any cpu".

When I create a console application it works fine. What am I doing wrong? Is it a permission issue? I changed the app-pool user to administrator but doensn't work either. When I try to change the pool to 32bit applications the pool crashes or the service times out.

The error message is:

System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {47E736CA-3EEA-11D5-8400-00A0C9CA15AD} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

Can anyone point me in the right direction?

Was it helpful?

Solution

That's because your COM DLL is 32 bit. SysWOW64 is for 32 bit components on 64 bit Windows. Your console application works because the it is being built as x86 (check the project properties), but the IIS app pool is 64 bit.

You need to create an new app pool in IIS, go to Advanced Properties and set Enable 32-Bit Applications to True. That will create you a 32 bit app pool and your COM dll will be found.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top