I have a .NET Web Service (SOAP) running on IIS that opens a MS Word application via COM.
Out of a sudden this fails on one of our test machines in the integration build with the following exception:
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070520 A specified logon session does not exist. It may already have been terminated. (Exception from HRESULT: 0x80070520).
Lately there have been Windows and Office Updates that I think might cause this behavior. Unfortunately when I restore the machine to an earlier backup, the updates get installed automatically and I end up with the same error so I can not reliably prove this. There could also have been infrastructural changes in the company domain but I do not know exactly where to start searching.
The machine is running Windows 10 20H2 with MS Office 2016 click to run. The user running the IIS application is a company domain user and part of the Administrator group.
Other machines (other operating systems of MS Office variants) do have this problem. But I am a afraid that this behavior could wind up on other machines or in production environments too.
I also tested opening MS Word via COM in the PowerShell which works. I saw a lot of google results with something about task schedulers that say I should set the group policy "Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options\Network access: Do not allow storage of passwords and credentials for network authentication" to disabled but this is already set to disabled.