(Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

1

I have an asp.net hosted in IIS, which uses the Com library: "Microsoft outlook 12.0 Object Library".

I am using this to convert the word Document to PDF, on my machine it works.

I have Office 2010 on my machine and on the server we have installed Office 2011 too, but when i try to run my app on the server it gives me the Following error:

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 given all the permissions to the aspnet user and other users full access. but this does not work

c#
asp.net
iis
asked on Stack Overflow Nov 13, 2018 by user8233075 • edited Nov 13, 2018 by rpm192

1 Answer

1

It means, your current Microsoft Word 97 – 2003 Document configuration doesn't allow to make this transaction on your server. Because, on your developpment machine, you use the rights of the connected user. But on the server, your application use the internet user's rights by default.

You should configure the Microsoft Word 97 – 2003 Document in the DCOM CONFIG on the server.

In order to do this, you can :

Windows + r on your keyboard to open the execute,

Type DCOMCNFG and hit enter,

On the list at left choose Component Service than Computers and than the server name.

Find Microsoft Word 97 – 2003 Document in the treeview.

Right click and properties.

On the openning popup, select Tab General and set Authentication level to None.

enter image description here

Than, on the security tab, you must choose an option that you want. In my server, I prefered to use a defined user :

enter image description here

And it should work.

answered on Stack Overflow Nov 13, 2018 by Coskun Ozogul

User contributions licensed under CC BY-SA 3.0