Forum Discussion
Bug: no reconnect to disconnected session with fSingleSessionPerUser=0
Affected: All Server 2019 Insider Previews including build 17713
Steps to reproduce: (no need to install RDSH role to reproduce the bug)
- enable multiple sessions per user:
Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Connections -> "Restrict Remote Desktop Services users to a single Remote Desktop Services Session" to "Disabled" - rdp to the server and log in as Administrator
- close the mstsc window or disconnect
- rdp to the server again, log in as Administrator and you will get a new session
taskmgr now shows 2 Administrator sessions: one disconnected and the new one just created - close the mstsc window or disconnect
- rdp to the server again, log in as Administrator and you will get a new session
taskmgr now shows 3 Administrator sessions: two disconnected and the new one just created - ...
If fSingleSessionPerUser == 0 you will not be able to reconnect to any disconnected session.
However, now the interesting part:
If you lock the session before the disconnect (ctrl+alt+end -> lock, then close mstsc) you will be successfully reconnected.
I suspect the error is in termsrv.dll's CSessionArbitrationHelper::Sessions_EnumDisconnectedUserSessions function.
You can alsoe reproduce this without rdp, directly on the console.
Set the policy as mentioned above, log in as Administrator, disconnect your own session in task manager, log in again and you get a new session.
This bug seems to be in termsrv.dll since Windows 10 1803 already.
Here is the solution:
gpmc.msc — Edit users policies— User Configuration — Policies — Administrative Templates — All Settings — Remove Lock Computer — Change to Enabled
- MosheSICopper Contributor
Here is the solution:
gpmc.msc — Edit users policies— User Configuration — Policies — Administrative Templates — All Settings — Remove Lock Computer — Change to Enabled
- Vinz FockerCopper Contributor
MosheSI Awesome! Thanks a lot!
Another way is setting the DisableLockWorkstation Registry Value to 1:Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] "DisableLockWorkstation"=dword:00000001
- Vinz FockerCopper ContributorI wonder why there is no feedback for a proper bug report. Is this forum actually the right place to report bugs ?
- Vinz FockerCopper Contributor
The bug still happens with Windows Server 2019 Insider Preview Build 17723
- MosheSICopper Contributor
Here is the solution:
gpmc.msc — Edit users policies— User Configuration — Policies — Administrative Templates — All Settings — Remove Lock Computer — Change to Enabled
- sergiiV2285Copper ContributorThanks for sharing this Vinz! Will test it nearest time and report back if it will help
- statarallCopper Contributor
The same problem still exist.
- sergiiV2285Copper Contributor
Do we have any solutions for this?
We have same problem even for current build of 2019 server that is used in Production
So problem migrated further..
Please help
- Andreas_SammerCopper Contributor
We have the same Problem with a Production Windows 2019 Server (Build 17763)
Locking the Session before disconnecting does seem to help, but is not a usable workaround for us.
- ScottMooreCopper Contributor
2016 server task manager's user list has right-click "Reconnect". Seems like the community agrees this issue is a result of the RemoteFX configuration being enabled by default
- sergiiV2285Copper Contributor
You mentioned some story (link was broken, i found it via search)..
but as i can see it is not related to our issue..RD is terminated - is not the same that we have.
We always get a new session, no matter what happened (resize, short internet outage, etc).
Just not possible to connect to previously running session, when this feature is enabled.
Regards,
Sergii Vinnikov
- hari4a3Copper Contributor
I do facing the same issues where when i try to connect to newly deployed server 2019 each time its establishing a new session instead of connecting back to new session and the session count is keep increasing. Have tried to applied the solution as per below but didn't work through. Is it really a bug with server 2019 or something i need to look for?
- sergiiV2285Copper Contributor
no Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options - different options not working for us
keepalive - also not helpful.
even with "Disconnected" session - you will never get this session back with current bug