Welcome to MSDN Blogs Sign in | Join | Help

Failed --Retrieving the COM class factory for component with CLSID ....

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 CMS Export / Import server side .net code = "ExportSiteContentIncremental(...) Failed --Retrieving the COM class factory for component with CLSID {CA0752B3-021C-4F99-82E3-2C0F19C5E953} failed due to the following error: 80040154."

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.

Published Tuesday, February 28, 2006 8:04 PM by Karthikeyan
Filed under:

Comments

# http://blogs.gotdotnet.com/default.aspx

Wednesday, March 22, 2006 11:19 AM by TrackBack

# Quanto ci sono 32 bit di troppo ...

Saturday, December 09, 2006 9:10 AM by Paolo Pialorsi

L'altro giorno ho pagato le spese di un problema legato all'istanziazione di componenti COM, via COM-Interop,...

# re: Failed --Retrieving the COM class factory for component with CLSID ....

Thursday, March 01, 2007 9:55 AM by mjda

Is there a workaround for an ASP.NET project calling the COM component?

# re: Failed --Retrieving the COM class factory for component with CLSID ....

Monday, August 06, 2007 8:29 AM by prafullparijat

Hi is there any way to call the COM object therough some other method?

# [.NET] Well COM This! « Zay’z - [ Den ‘O’ Slack ]

Saturday, March 08, 2008 11:10 PM by [.NET] Well COM This! « Zay’z - [ Den ‘O’ Slack ]

# New Coding Jobs » fix error: Retrieving the COM class factory

# New Coding Jobs » fix error: Retrieving the COM class factory

# re: Failed --Retrieving the COM class factory for component with CLSID ....

Wednesday, July 22, 2009 5:31 AM by mrsiva

Thanks Karthi.

This article helped me. I was running behind this problem for about a week.

Is there a way this can be applied on ASP.Net application?

I get the following error when I target it for x86 and use in ASP.net

System.BadImageFormatException: Could not load file or assembly 'MyClassLibrary' or one of its dependencies. An attempt was made to load a program with an incorrect format.

WRN: Assembly binding logging is turned OFF.

To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

Note: There is some performance penalty associated with assembly bind failure logging.

To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Anonymous comments are disabled
 
Page view tracker