Wednesday 15 February 2017

retrieving the com class factory for component with clsid failed due to the following error asp net



Solution:
Open the project in VS
Right click on project
Select properties
In the Build tab - platform target =Any CPU

if above is not working, try below..

Exact error for me:
Retrieving the COM class factory for component
with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following er
ror: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_
SERVER_EXEC_FAILURE)).
Job Completed
Press any key to continue to close...



Error:

Retrieving the COM class factory for component
with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80040153 Invalid value for registry (Exception from HRESULT: 0x80040153 (RE
GDB_E_INVALIDVALUE)).

Solution: 
Go to Run
Type: regedit
Go to this path: HKey_Classes_Root\Wow6432Node\CLSID\[GUID]
Mine is: HKey_Classes_Root\Wow6432Node\CLSID\[0006F03A-0000-0000-C000-000000000046]
Select "0006F03A-0000-0000-C000-000000000046"
Click on Right side pane
Right click "New" -->String Value
Name it: AppID
Value data: 0006F03A-0000-0000-C000-000000000046 (COM object GUID, which u got in above steps)

Right click "New" -->String Value
Name it: DllSurrogate
Value data:

Go to this path: HKey_Local_Machine\Software\Classes\AppID
Search for "0006F03A-0000-0000-C000-000000000046", if it is there don't do anything.
if you don't find it then..
Right click on -->New -->Key
Enter : 0006F03A-0000-0000-C000-000000000046



Error Message:

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0×80070005 (E_ACCESSDENIED)).
Solution:

This is a COM permissions problem.

Start > Run > dcomcnfg (or “mmc -32″ and then add the Component Services snap-in manually if you can’t find the app under step 3)
Navigate to Component Services > Computers > My Computer > DCOM Config
Locate the MS application giving you trouble (eg: “Microsoft Outlook Application” )
Right click > Properties
On the security tab: Select Customize under Launch and Activation Permissions and click Edit…
Add the account under which the site is running (eg: Network Service or Everyone) and assign Local Launch & Local Activation permissions