1

We are migrating some legacy applications from Win 2003 Server + IIS6 to a new server Win 2008 Server + IIS7.

We are facing several issues, last of these is that some of our applications are using Office Interop v11 (Office 2003), while on the new server is installed Office 2010 ( + interop v14).

I'm 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 tried to solve it following a lot of forums (this one, for example: http://forums.asp.net/t/1303594.aspx/1). But nothing changes...

Now I'm wondering if this could depend on different version of interop installed. Is there a way to get legacy apps working without recompile them for the new version of interop?

davioooh
  • 23,742
  • 39
  • 159
  • 250
  • I'm aware that this might not be an option for you at the moment, but you should not be using Office Interop in web applications at all. [It's not officially supported by Microsoft.](http://stackoverflow.com/a/8709255/87698) – Heinzi Jun 27 '13 at 13:35
  • @Heinzi I know, but as I said these are legacy applications... – davioooh Jun 27 '13 at 13:43

2 Answers2

1

Try NetOffice. It's a pretty transparent wrapper around Office Interop API. They detect and load available Interop DLLs at runtime, so you don't have to build your solution against them.

MisterMetaphor
  • 5,900
  • 3
  • 24
  • 31
  • Do I have to change any reference/dependency in my applications to use this tool? – davioooh Jun 27 '13 at 13:58
  • It's a library. You'll need to reference it and change your `using` directives to import NetOffice types instead of Interop ones. The code that uses Interop will need little to no change. – MisterMetaphor Jun 27 '13 at 14:01
0

To solve this problem I simply installed Office 2003 on the new server. (I discovered two versions of Office can coexist without conflict on the same machine...)

davioooh
  • 23,742
  • 39
  • 159
  • 250