Issue:
When using a Windows scheduled task for running the Vault Backup Utility that comes with the IMAGINiT Utilities for Vault Server, the task fails with a message:
"Unable to create Task...
System.Runtime.InteropServices.COMException:A specified logon session does not exist. It may already have been terminated. (Exception from HRESULT: 0x80070520)"
Causes:
There is a problem with permissions for the Windows UserID that specifies how the scheduled task should "Run As". For example:
Solution:
According to Microsoft's Tech Community article, the solution was first published in 2012. This error will only occur if the following Security Policy is enabled and you select the “Run whether user is logged on or not” Security option on the General tab, when creating a new task:
To correct this, run SECPOL.MSC
Then under Security Settings open Local Policies > Security Options and select:
Network access: Do not allow storage of passwords and credentials for network authentication
Set this policy to Disabled.
According to the Microsoft Tech Community article:
"Task Scheduler uses Windows Credential Manager to store the credentials of the account that is specified to perform a task. If the Network access: Do not allow storage of passwords and credentials for network authentication policy is enabled and applied, Credential Manager cannot store the credentials locally, thus this error message appears."
About the Author
Follow on Linkedin More Content by Bob Felton