Retrieving the COM class factory for component with CLSID {AD37B7D5-B5A3-460A-8FFB-3C71984A4537} failed due to the following error: 80040154.
Exception details:
System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {AD37B7D5-B5A3-460A-8FFB-3C71984A4537} failed due to the following error: 80040154.
I'm using A COM DLL in my ASP.NET Web Application. I have managed to successfully get it working on both my own dev machine and a build machine.
However when I try deploying the project to a different machine (Microsoft Windows Server 2003 R2) I get the above error.
I have registered the COM DLL using the regsvr32 command. It says the DLL was registered successfully.
I am developing the project in Visual Studio 2008 with ASP.NET version 3.5 and building my project to run on any CPU, each machine uses 64-bit Windows.
I'm using IIS version 6.0.
(I have tried enabling IIS to run 32-bit applications, this caused the web application to be unavailable.)
I wrote a Windows script file to check weather the COM DLL was working or not on (i.e. independent from the project).
This script worked fine on both my build machine and my own dev machine.
However it did not run properly on the machine I'm having trouble with (Microsoft Windows Server 2003 R2).
What I had to do was to run the script from the command line using the following command (which I found here):
C:\WINDOWS\SysWOW64\wscript.exe COMtest.js
The wscript file works succesfully when ran in this way.
I presume it has something to do with the version that the COM DLL was built for.
Do I need to enable some settings in my Visual Studio project?
(Please note I have not built the COM DLL myself. Someone else has built it and given it to me.)