I have following code which opens visio file:
Microsoft.Office.Interop.Visio.Document vXfuncStencil = null;
var app = new Microsoft.Office.Interop.Visio.Application();
vXfuncStencil = app.Documents.OpenEx(@"C:\Program Files\Microsoft Office\Office16\Visio Content\1033\XFUNC_U.VSSX", 4);
app.Quit();
It works fine in console app but gives following error when I run through windows service:
System.Runtime.InteropServices.COMException (0x86DB03E7): An exception occurred. at Microsoft.Office.Interop.Visio.DocumentsClass.OpenEx(String FileName, Int16 Flags)
Some notes:
- We run our job as Windows Service under a specific service account (also added as Local Administrator on the server)
- We can't find any information about the error: 0x86DB03E7.
- We are running code in Azure VM - windows server 2019 (64 bit), visio 2016 64 bit
- The same application working fine on our on-premise server. We are migrating to Azure server and it's not working. We compared all the setting on both the server.
Does anyone know what the error 0x86DB03E7 is about? Why it's not working from windows service?