Asp.net project not invoking the visio application after i close the RDP connections

40 Views Asked by At

I have created an Asp.Net web application that uses the Microsoft Visio application to perform certain functions. I have also installed Microsoft Visio 2019 on the server. To implement this functionality, I have utilized the Microsoft Office Interop Visio Library. Everything is functioning perfectly on my local machine, however, when I attempted to deploy it, I encountered a permission issue that was followed by an error message.

Based on suggestions provided by the Microsoft forum, I have attempted the following solutions:

  1. Open DCOMCNFG and right-click on My Computer to select properties.

  2. Go to the COM Securities tab.

  3. Add "IIS_IUSRS" to Access Permissions and provide full permission.

  4. Add "IIS_IUSRS" to Launch and Activation Permissions and provide full permission.

  5. Change the user to an interactive user (Only works if I am logged in to the server) in the Identity tab.

  6. Use "This user" with Admin account credentials, however, this did not work and resulted in an RPC Failed error message.

  7. The problem persisted even when the user logged out from a remote connection.

  8. Sometimes, I also received the following error message:

    Retrieving the COM class factory for component with CLSID {00021A20-0000-0000-C000-000000000046} failed due to the following error: 8000401a The server process could not be started because the configured identity is incorrect. Check the username and password. (Exception from HRESULT: 0x8000401A)

I have tried adding Network Service users, EVERYONE, ANONYMOUS users, and so on to the security tabs, but to no avail.

1

There are 1 best solutions below

0
YurongDai On

Microsoft does not recommend or support server-side Automation of Office. To avoid performance and stability issues and ensure compliance with software license agreements, Microsoft recommends that developers use other suitable tools and technologies on the server side, such as the Open XML SDK, rather than relying directly on Office's server-side automation.

Please note that unlike Word DocumentFormat.OpenXml.Wordprocessing or Excel DocumentFormat.OpenXml.Spreadsheet, specialized OpenXml package (library) for Visio does not exist. Means, you'll need to work with plain xml basically.

Microsoft has an article regarding this:

https://learn.microsoft.com/en-us/office/client-developer/visio/how-to-manipulate-the-visio-file-format-programmatically