I have a native c++ COM server that exposes COM interfaces. I can successfully use a native c++ client application to get and use the exposed interfaces from the server.
When I use a .net client with a reference to the server, I get the error:
Retrieving the COM class factory for component with CLSID {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).
...even though the COM server starts and runs successfully (and only takes about 1 or 2 seconds to startup).
BUT I get the above error only when the server is registered as a local server. If I register the server as a windows service, the .net client can successfully get and use the interfaces just fine.
I'm doing all this as an admin on Windows 7 64-bit. The COM server is on the local machine.
I checked the thread below, but no answers were offered: Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80080005
Spent a day and a half on this one so far...what could be the problem?
More information:
I've had this working with vs2005. I recently updated to vs2010 and am now running into this issue. I've tried building the .net client targeting frameworks 2.0, 3.5, and 4.0 with the same results.
Thanks
I was seeing this error when using a .net app running on x64 to try to connect to a 32 bit COM app. I was able to fix it easily by switching my .net app to x86 (32 bit).
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
For More information check this Link
User contributions licensed under CC BY-SA 3.0