2

It's about a simple Office (Visio) Automation Web App that convert files from vsdx to svg.

The app works well in IIS on my PC- windows 10 Enterprise. But, don't works well in IIS on my server- Windows Server 2019 Standard.

Of course, I have tried the same code and same IIS configuration on both PC and server, What can be the issue? The app can't open a file inside the Visio and throws an error(with no info) in the following line:

using Visio = Microsoft.Office.Interop.Visio;
Visio.InvisibleApp visioInvisibleApp = null;
...
Visio.Document doc = visioInvisibleApp.Documents.Open(vsdxSourcePath);

I have tried the following:

  1. Change the Identity of the App Pool
  2. Grant a permission for EVERYONE in the publish folder
  3. Grant permission for EVERYONE in COM Security for Access, Launch and Activation.

What else can I do to cause the app to run on the server like on the computer?

  • 1
    KB257757 - https://support.microsoft.com/en-gb/topic/considerations-for-server-side-automation-of-office-48bcfe93-8a89-47f1-0bce-017433ad79e2 – Jeremy Thompson Jul 21 '21 at 23:36
  • No matter how well it runs on a machine, this is never a supported setup by Microsoft so doom to fail somewhere else and you can do nothing about it. – Lex Li Jul 22 '21 at 01:08
  • So you've found out Office Automation is NOT supported server-side. KB257757. But you know that it can be done: https://products.aspose.app/diagram/conversion/vsdx-to-svg . What you need to do is find some open source libraries that don't depend on Microsoft Interop DLLs, here's one example how I convert from Docx to PDF **without Interop** https://stackoverflow.com/a/46658645/495455 – Jeremy Thompson Jul 22 '21 at 03:27
  • 1
    @JeremyThompson, I already tried the converter of ASPOSE https://products.aspose.app/diagram/conversion/visio-to-svg. Unfortunately, their conversion is not good enough for me (wrong text font, location and etc.). Till now, only Visio convert my diagrams correct. I work with huge and complicated diagrams. Do you know any other solution/option? – Gal Tzemach1 Jul 22 '21 at 15:35
  • 1
    Fixed -> https://stackoverflow.com/a/68882128/14656888 – Gal Tzemach Aug 22 '21 at 14:26

0 Answers0