Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to convert the .doc file to .docx file using c# in asp.net. It is working fine through Visual Studio 2010. But after hosting the application in IIS it is not working. It is not converting the .doc file to .docx file. I checked in the Log file. I got the following error message
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

Please help me to resolve this issue.
Thanks in Advance
Posted
Updated 15-Feb-15 19:31pm
v2

1 solution

Your problem is that you're trying to access the Word COM API from IIS. That is not a good practice. It makes desktop application Microsoft Word be present on your production server. Why on Earth should it be there? It's not good at all to call a desktop application from the server side code. Of course IIS forbids such stuff.

Instead you should find a library which doesn't depend on COM API. A good one (paid though) is the one made by Aspose, in particular, you're interested in Aspose.Words for .NET. I worked with it in an ASP.NET project. You can try to find some free libraries around.
 
Share this answer
 

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