Could not find Microsoft Word document in DCOM configuration

I am creating a simple asp.net website that uses office automation 2007/2010. When I published the site on iis 7 on my local machine (window 7), there is an exception

Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)). 

I was looking for this exception, and I found that I need to set some permissions to work in DCOM Config.

I opened component services and opened DCOM Config, but I did not find Microsoft Word Document, I found only office word 97-2003.

can someone tell me how to solve this problem.

+6
source share
2 answers

Found the answer here: DCOM Office Automation Error

If you are using a 64-bit server with 32-bit Office, you may not be able to find this DCOM setting. You will need to run “MMC-32” from the command line to start the 32-bit MMC, and then add “Component Services” from the menu “File”> “Add and Remove Snap-ins”.

+14
source

Yes, Office Word 97-2003 is the correct name for a DCOM document (such as an application) for Word 2007 or 2010. Do not ask me why ...

Where could the problem be?

The user must have access to the desktop. If Word is called from ASP.NET, it probably does not have this access. Therefore, explicitly specify the account in dcomcnfg.exe. Do not use the launching user (this is the IIS identifier, it does not have its own desktop) and does not use the interactive user (it only works if any user logs on to the system).

In my solution, I installed:

  • I created a new user (in a user group) called WordUser
  • I created a new IIS application pool with WordUser permission; Uploading a user profile should be true.
  • DCOM I decided to use WordUser, on the Security tab I added WordUser wit Startup and Activation Permission and Permission

Perhaps another way is possible, but this should work.

+4
source

Source: https://habr.com/ru/post/924732/


All Articles