tags:

views:

4729

answers:

3

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

+1  A: 

Here are the instructions:

http://blog.crowe.co.nz/archive/2006/03/02/589.aspx

He's got a bigger problem than that if he's really trying to launch Excel from ASP.NET. It's not supported, usually doesn't work properly, and violates the license unless all his users have their own Excel license.
John Saunders
@John, he is deploying it to the intranet, the corp. properly have a site-wide license.
tomjen
Probably, or maybe, and that won't make the code work.
John Saunders
+1  A: 

There's one more issue you might need to address if you are using the Windows 2008 Server with IIS7. The server might report the following error:

Microsoft Office Excel cannot access the file 'c:\temp\test.xls'. There are several possible reasons:

  • The file name or path does not exist.
  • The file is being used by another program.
  • The workbook you are trying to save has the same name as a currently open workbook.

The solution is posted here (look for the text posted by user Ogawa): http://social.msdn.microsoft.com/Forums/en-US/innovateonoffice/thread/b81a3c4e-62db-488b-af06-44421818ef91?prof=required

A: 

In case it helps somebody:

I am running Windows 7 64-bit and I wanted to register a 32-bit dll.

First I tried: regsvr32 and got the following error:

System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {A1D59B81-C868-4F66-B58F-AC94A4A7982E} failed due to the following error: 80040154.

Then I tried to add the application through the Component Services (Run->DCCOMCNFG) (http://www.justskins.com/forums/difference-registering-dll-using-regsvr32-and-component-services-17280.html) and got the following error:

System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {A1D59B81-C868-4F66-B58F-AC94A4A7982E} failed due to the following error: 80070005.

There are many links to solving it but what worked for me was: Console Root -> Component Services -> Computers -> My Computer -> COM+ Applications -> -> Properties: Security tab: Authorization: Uncheck 'Enforce access checks for this application'.

I don't know what it does.

iguigova