Retrieving the COM class factory for component failed

Xyz picture Xyz · May 19, 2009 · Viewed 162.7k times · Source

I am using an excel object (COM component) for excel manipulation. It works fine on my PC, but when I deploy the application to our Intranet I am getting this error:

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005

I am using windows authentication and impersonate=true in my web.config.

I made all the settings in component service but it still gives the same error.

Please help

Answer

Monic picture Monic · Aug 19, 2014

I had the same error when I deployed my app. I've got solution from this site: Component with CLSID XXX failed due to the following error: 80070005 Access is denied

Here is this solution:

  1. In DCOMCNFG, right click on the My Computer and select properties.

  2. Choose the COM Securities tab.

  3. In Access Permissions, click Edit Defaults and add Network Service to it and give it Allow local access permission. Do the same for < Machine_name >\Users.

  4. In Launch and Activation Permissions, click Edit Defaults and add Network Service to it and give it Local launch and Local Activation permission. Do the same for < Machine_name >\Users.

*I used forms authentication.