"A specified logon session does not exist. It may already have been terminated" error when you try to map to a network drive of a DFS share

Applies to: Windows Server 2019, all versionsWindows Server 2016 DatacenterWindows Server 2016 Essentials More

Symptoms


You log on to your Windows desktop computer by using your regular domain account. When you use explicit credentials to map to a Distributed File System (DFS) share, you receive the following error message:
System error 1312 has occurred.
A specified logon session does not exist. It may already have been terminated.

Cause


This behavior occurs when the "Do not allow storage of credentials or .NET Passports for network authentication" Network access policy is enabled.

Workaround


To work around this behavior, follow these steps:
  1. On the Management Server, click Start, click Run, type gpedit.msc, and then click OK.
  2. Under Computer Configuration, expand Windows Settings, expand Security Settings, expand Local Policies, and then expand Security Options.
  3. In the Policy pane, right-click Network access: Do not allow storage of credentials or .NET Passports for network authentication, click Properties, click Disabled, and then click OK. The corresponding registry name and location is:
    Location: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Name: DisableDomainCredsValue: 1 (DWORD)

Status


This behavior is by design.