0
votes

I'm using https://www.npmjs.com/package/node-msoffice-pdf to convert a word to a pdf. This solution works perfectly on my computer.

I updated my app in IIS and I get this error when calling the web service that converts the docx to pdf:

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)).

I have tried several answers and tutorials step by step such as:

But I got to nowhere.

I also tried to run my app in the server but as localhost and it worked perfectly, zero problems.

I noticed that the CLSID in the error message it isn't the same as the Microsoft Word 97 - 2003 Document Component Service App ID.

The only tutorial that got me somewhere is this one http://toastergremlin.com/?p=543. The error was gone but the Word wasn't being opened and the web service just got stuck.

In the Microsoft Word 97 - 2003 Document Component Service I tried to add the following users: NETWORK_SERVICE, IIS_IUSRS, PC\Users and the apppool associated with my website.

1
Not directly related to your permission problem, but using interop with Office COM objects from a web server can be very error-prone.Eric J.
@EricJ. I guess I'm starting to experience that :)Duarte Mendes
You should be able to determine the dll it is try to load in the registry. HKEY_CLASSES_ROOT\CLSID\{000209FF-0000-0000-C000-000000000046}user957902

1 Answers

0
votes

I had similar issue when trying to create my own Interop DLL thru IIS web. And after lot of searches, this post solved my life