Click here to Skip to main content
16,006,001 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I created a web application in which I am generating a ms-word document using Microsoft.Office.Interop.Word dll.
The application is running fine in the visual studio but when I tried to run on IIS 5.0 through virtual directory then its giving the following error -

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

In my application I have taken reference of Microsoft Word 12.0 Object Library, but its coming as Microsoft.Office.Interop.Word dll, this interop dll is just a wrapper of the actual word COM dll.
But I have to register the actual word COM dll. so my problem is to find -

1) The path of the original word dll(COM)
2) How to register this dll, either using regsvr32 or to register on IIS.

OR there will be any other solution.
I have gone through many forums but did'nt get any solution.

If you have any idea/suggestion on COM Word components please revert me back.

Many Thanks,
Posted
Updated 27-Dec-10 20:18pm
v2
Comments
Dalek Dave 28-Dec-10 2:18am    
Edited for Spelling, Grammar and Readability.

1 solution

The easiest way I see it, would be to have MS Word installed on the server running your IIS. I advise you though to put the Word <--> COM part in a separate process as a service to avoid having to restart IIS every now and then (see Caveat).

Caveat: I was involved in a project 1999 that did MS Word COM interop (from java and a servlet based application) and ran into the problem that the application server had to restarted every now and then because there was a memory leak, that is MS Word or COM didn't realease all
resources eventhough we explicitely cleaned everything up.


Cheers,


Manfred
 
Share this answer
 
Comments
Manfred Rudolf Bihy 28-Dec-10 9:18am    
Moved OPs answer to comment:
thanks for your answer -
I got it working as I have added two more users in DCOM Config:

In Computer Services->Computers->My Computer->DCOM Config->Microsoft Office Word 97-2003 Document

Security tab-> add everywhere iusr and iwam, give all the permissions to that users.

Now it will work.

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