Share via

Access Denied Error 80070005 with DCOM in .NET 4.8 Web Applications on Windows Server 2022

Anonymous
2024-03-08T07:44:38+00:00

I am experiencing an issue with the Distributed Component Object Model (DCOM) in a server environment where multiple web applications interact with Microsoft Office documents. Below are the details and steps that led to the problem:

Environment:

  • Server OS: Windows Server 2022 Standard
  • Development OS: Windows 10 Enterprise LTSC
  • Framework: .NET Framework 4.8
  • Hosting: IIS (Internet Information Services)
  • Libraries: Microsoft.Office.Interop.Excel, Microsoft.Office.Interop.Word

Issue:

When one application uses DCOM to open a Word or Excel file, other applications fail to open their respective documents using DCOM, even after the initial application has stopped using DCOM. The error persists until the server is rebooted.

Error Message:

(Excel): Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

(Word): 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)).

Steps to Reproduce:

  1. Application A opens a Word/Excel file using DCOM.
  2. Application B attempts to open a Word/Excel file using DCOM while Application A is running or after it has stopped.
  3. Application B encounters the access denied error.

Attempted Solutions:

  • Rebooting the server temporarily resolves the issue until DCOM is used again.
  • The error does not occur on my development machine running Windows 10.

Questions:

  1. What could be the root cause of the DCOM access denied error in a server environment but not on a development machine?
  2. How can I resolve the competition between different DCOM applications without rebooting the server?

Any insights or solutions to this persistent DCOM access issue would be greatly appreciated.

Microsoft 365 and Office | Install, redeem, activate | Other | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-03-13T21:22:19+00:00

    Hello Eric,

    Thank you for posting in Microsoft Community.

    I would like to answer your question further, but it seems to be beyond my expertise. It's more complex than what we usually discuss here in the community. To help you get the accurate information you need, go to the site and ask questions to the experts dedicated to Microsoft Questions - Microsoft Q&A or Welcome to the Word group! (microsoft.com) Microsoft Center Community. They are experts in these kinds of concerns.

    We'll leave this thread open for our MVPs or other subject matter expert members to share their answers.

    Regards,

    Prince R

    Microsoft Moderator

    Was this answer helpful?

    0 comments No comments