tags:

views:

54

answers:

4

I have an ASP.NET 3.5 application where I am using an ActiveX control. When I try to run the website from Visual Studio 2008 using built-in web server it is working like a charm.

When I publish the same code to IIS I get the following error:

Retrieving the COM class factory for component with CLSID {ADAACEC8-D9F2-4E05-A5F3-D29E5C9C82F9} failed due to the following error: 80040154. 

How can I fix this issue??

A: 

Just a guess. You can add to you web.config file

<identity impersonate="true" userName="Domain\MyUsername" password="MyPassword"/>

Once i had a similar problem and this solved it.

Adrian Faciu
Tried this. Still not working Adrian
acadia
@acadia - Do you get the same error ?
Adrian Faciu
@Adrian- I get the same error
acadia
+1  A: 

The HRESULT in the error message (80040154) usually means 'Class not Registered'.

Try re-registering the component:

regsvr32.exe MyActiveX.dll /u
regsvr32.exe MyActiveX.dll
Kev
+1  A: 

could be a number of reasons. http://support.microsoft.com/kb/257757 listed some of them. In addition to the problems mentioned in the article, there could be some DLL loading issue, such as the COM DLL may not support the CPU architecture of the application pool, or one of its dependencies can not be found or can not be accessed.

Sheng Jiang 蒋晟
A: 

To build on what Kev and Sheng Jiang 蒋晟 have said, it sounds like the COM component isn't registered properly or is having a bitness issue.

Is the activex DLL written in C++/compiled specifically for 32 or 64 bit/ or use DLLs that are specifically 32 or 64 bit?

If the ActiveX dll can run in either an x86 or x64 process, then it might not be registered correctly.

  • If IIS is running as a x64 process register the COM component with C:\Windows\system32\regsvr32.exe.
  • If IIS is running the component in x86/32bit worker processes try registering it with C:\Windows\syswow64\regsvr32.exe
nick