Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installed Word on the server but cannot find it to set permissions in Component Services

I was looking at this problem on SO; System.UnauthorizedAccessException: Retrieving the COM class factory for Word Interop fails with error 80070005.

We had word installed in the test server in order to get the Word Interop to work on it. That lead to this new bug, and I cannot apply the fix recommended by I cannot find Microsoft Word on the Componenet Services DCOM Config. So how can I fix this?

like image 455
arame3333 Avatar asked Mar 06 '13 15:03

arame3333


People also ask

How do I change Component Services owner and permission?

Change ownershipClick the Advanced button in the Permissions window and select the Owner tab. You'll notice the Trusted Installer as owner. Click the Change link (next to the current owner) to select the applicable owner (e.g. Local Administrators group) and click Apply, then OK.

How do I change permissions in DCOM?

To set access permissions for a computer On the Default Security property page in Dcomcnfg.exe, choose the Edit Default button in the Default Access Permissions area. To remove users or groups, select the user or group you want to remove and choose the Remove button.

Where is DCOM settings?

Click on the Windows Start button, and select Run and then type “dcomcnfg” to open the DCOM configuration dialog box. Navigate inside the Console Root folder to the Component Services folder and then to the Computers folder.


1 Answers

Using the ERR tool we see the error: 80070005 is an Access Denied, so you either do not have permissions or its by-design.

 for hex 0x80070005 / decimal -2147024891 :
  COR_E_UNAUTHORIZEDACCESS                                      corerror.h     
 MessageText: 
 Access is denied.
  DIERR_OTHERAPPHASPRIO                                         dinput.h       
  DIERR_READONLY                                                dinput.h       
  DIERR_HANDLEEXISTS                                            dinput.h       
  DSERR_ACCESSDENIED                                            dsound.h       
  ecAccessDenied                                                ec.h           
  ecPropSecurityViolation                                       ec.h           
  MAPI_E_NO_ACCESS                                              mapicode.h     
  STIERR_READONLY                                               stierr.h       
  STIERR_NOTINITIALIZED                                         stierr.h       
  E_ACCESSDENIED                                                winerror.h     
 General access denied error
 11 matches found for "0x80070005"

I mention by-design because of all the problems documented in this KB article: Considerations for server-side Automation of Office.

Installing Office on Server OS's leads to all sorts of problems. For VSTO development I install TFS on Win7 for automated builds to avoid server-side interop problems.

Dont use a Server OS for Office automation, as per the KB article its not supported, use Win7!

Microsoft strongly recommends a number of alternatives that do not require Office to be installed server-side, and that can perform most common tasks more efficiently and more quickly than Automation. Before you involve Office as a server-side component in your project, consider alternatives.

like image 116
Jeremy Thompson Avatar answered Nov 14 '22 21:11

Jeremy Thompson