Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I'am having the following error while hosting an Asp.Net web application in IIS 6.0

---------
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070002 The system cannot find the file specified. (Exception from HRESULT: 0x80070002).
---------

What I have tried:

I've tried all the solutions posted here and there through google but none of the advise actually worked for me.
I'll be appreciated if any one can post a step by step solution for the issue.

Is this require a licensed version of Microsoft Office 2007?
Posted
Updated 2-Feb-17 3:30am
Comments
[no name] 2-Feb-17 9:23am    
The step by step solution for your problem is the same as everyone else. Office interop is not recommended or supported for web applications. You need to find another way to do whatever it is you are doing.
Philippe Mori 3-Feb-17 10:17am    
It is well known that Office interop should not be used on a server. It is not designed for that purpose and even if you make it works, it would be very slow. Having said that, if you don't listen common advices, you would still need to buy a licence for that computer. Don't expect that to be possible if you use shared hosting. By the way, there are many alternatives. One is Open XML SDK.
Richard Deeming 2-Feb-17 10:19am    
Google thinks that CLSID is related to Excel. If that's the case, then you'll need to rewrite your code to use a library that doesn't rely on Office Interop - eg:

* EPPlus[^];
* ClosedXML[^];
* ExcelDataReader[^];
* The OpenXML SDK[^];

If it's a different Office application you're trying to automate, you're going to need to find another way to do it.

1 solution

You can't automate Office apps from a web site, it isn't supported. It might work ok on your local machine but working on your local machine is very different to working in a mutli-threaded environment like a live web server. You'll need to come up with alternatives that are ok to use on a web site.
 
Share this answer
 
Comments
Richard Deeming 2-Feb-17 10:16am    
Might be worth linking to the MS KB article that backs this up:
Considerations for server-side Automation of Office[^]
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.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900