Latest

retrieving the com class factory for component with clsid 80040154 Retrieving the COM class factory for component with CLSID {...} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)

PROBLEM:
When you run the .net Code in X64 Environment you will get the following error message.
" Failed --Retrieving the COM class factory for component with CLSID ...."
E.g. in Retrieving the COM class factory for component with CLSID {94773112-72E8-11D0-A42E-00A024DED613} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)

WORKAROUND:
The possible workaround is modify your project's platform from 'Any CPU' to 'X86' (in Project's Properties, Build/Platform's Target)


ROOTCAUSE
The VSS Interop is a managed assembly using 32-bit Framework and the dll contains a 32-bit COM object. If you run this COM dll in 64 bit environment, you will get the error message.

SOLUTION
  1. Open IIS
  2. Select  the application pool used by your website
  3. Click Advanced setting
  4. enable 32-bit Application to TRUE which was set to False by default.
  5. Restart IIS 
  6. Now its resolved. :) 


No comments