SOLVED

Bug: no reconnect to disconnected session with fSingleSessionPerUser=0

%3CLINGO-SUB%20id%3D%22lingo-sub-218413%22%20slang%3D%22en-US%22%3EBug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-218413%22%20slang%3D%22en-US%22%3E%3CP%3EAffected%3A%20All%20Server%202019%20Insider%20Previews%20including%20build%2017713%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESteps%20to%20reproduce%3A%20(no%20need%20to%20install%20RDSH%20role%20to%20reproduce%20the%20bug)%3C%2FP%3E%3CUL%3E%3CLI%3Eenable%20multiple%20sessions%20per%20user%3A%3CBR%20%2F%3EComputer%20Configuration%20-%26gt%3B%20Administrative%20Templates%20-%26gt%3B%20Windows%20Components%20-%26gt%3B%20Remote%20Desktop%20Services%20-%26gt%3B%20Remote%20Desktop%20Session%20Host%20-%26gt%3B%20Connections%20-%26gt%3B%20%22Restrict%20Remote%20Desktop%20Services%20users%20to%20a%20single%20Remote%20Desktop%20Services%20Session%22%20to%20%22Disabled%22%3C%2FLI%3E%3CLI%3Erdp%20to%20the%20server%20and%20log%20in%20as%20Administrator%3C%2FLI%3E%3CLI%3Eclose%20the%20mstsc%20window%20or%20disconnect%3C%2FLI%3E%3CLI%3Erdp%20to%20the%20server%20again%2C%20log%20in%20as%20Administrator%20and%20you%20will%20get%20a%20new%20session%3CBR%20%2F%3Etaskmgr%20now%20shows%202%20Administrator%20sessions%3A%20one%20disconnected%20and%20the%20new%20one%20just%20created%3C%2FLI%3E%3CLI%3Eclose%20the%20mstsc%20window%20or%20disconnect%3C%2FLI%3E%3CLI%3E%3CSPAN%3Erdp%20to%20the%20server%20again%2C%20log%20in%20as%20Administrator%20and%20you%20will%20get%20a%20new%20session%3CBR%20%2F%3Etaskmgr%20now%20shows%203%20Administrator%20sessions%3A%20two%20disconnected%20and%20the%20new%20one%20just%20created%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E...%3C%2FLI%3E%3C%2FUL%3E%3CP%3EIf%20fSingleSessionPerUser%20%3D%3D%200%20you%20will%20not%20be%20able%20to%20reconnect%20to%20any%20disconnected%20session.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20now%20the%20interesting%20part%3A%3CBR%20%2F%3EIf%20you%20lock%20the%20session%26nbsp%3B%3CSTRONG%3Ebefore%26nbsp%3B%3C%2FSTRONG%3Ethe%20disconnect%20(ctrl%2Balt%2Bend%20-%26gt%3B%20lock%2C%20then%20close%20mstsc)%20you%20will%20be%20successfully%20reconnected.%3C%2FP%3E%3CP%3EI%20suspect%20the%20error%20is%20in%26nbsp%3B%20termsrv.dll's%20CSessionArbitrationHelper%3A%3ASessions_EnumDisconnectedUserSessions%20function.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20alsoe%20reproduce%20this%20without%20rdp%2C%20directly%20on%20the%20console.%3CBR%20%2F%3ESet%20the%20policy%20as%20mentioned%20above%2C%20log%20in%20as%20Administrator%2C%20disconnect%20your%20own%20session%20in%20task%20manager%2C%20log%20in%20again%20and%20you%20get%20a%20new%20session.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20bug%20seems%20to%20be%20in%20termsrv.dll%20since%20Windows%2010%201803%20already.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-218413%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ERemote%20Desktop%20Services%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESecurity%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-282056%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-282056%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20same%20problem%20still%20exist.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-221982%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-221982%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20bug%20still%20happens%20with%26nbsp%3BWindows%20Server%202019%20Insider%20Preview%20Build%2017723%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-219132%22%20slang%3D%22en-US%22%3ERE%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219132%22%20slang%3D%22en-US%22%3EI%20wonder%20why%20there%20is%20no%20feedback%20for%20a%20proper%20bug%20report.%20Is%20this%20forum%20actually%20the%20right%20place%20to%20report%20bugs%20%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-528315%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-528315%22%20slang%3D%22en-US%22%3E%3CP%3EDo%20we%20have%20any%20solutions%20for%20this%3F%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20same%20problem%20even%20for%20current%20build%20of%202019%20server%20that%20is%20used%20in%20Production%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20problem%20migrated%20further..%3C%2FP%3E%3CP%3EPlease%20help%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-788190%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-788190%22%20slang%3D%22en-US%22%3E%3CP%3E2016%20server%20task%20manager's%20user%20list%20has%20right-click%20%22Reconnect%22.%26nbsp%3B%20Seems%20like%20the%20community%20agrees%20this%20issue%20is%20a%20result%20of%20the%20RemoteFX%20configuration%20being%20enabled%20by%20default%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fprevious-versions%2Fwindows%2Fit-pro%2Fwindows-server-2008-R2-and-2008%2Fff817578(v%3Dws.10%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fprevious-versions%2Fwindows%2Fit-pro%2Fwindows-server-2008-R2-and-2008%2Fff817578(v%3Dws.10%3C%2FA%3E)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-800257%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-800257%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F387423%22%20target%3D%22_blank%22%3E%40ScottMoore%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20mentioned%20some%20story%20(link%20was%20broken%2C%20i%20found%20it%20via%20search)..%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fsocial.technet.microsoft.com%2FForums%2Fwindowsserver%2Fen-US%2F68dfb072-9192-4f5e-a9e3-d75298d9f971%2Frd-is-terminated-before-even-starting-access-is-denied%3Fforum%3DwinserverTS%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsocial.technet.microsoft.com%2FForums%2Fwindowsserver%2Fen-US%2F68dfb072-9192-4f5e-a9e3-d75298d9f971%2Frd-is-terminated-before-even-starting-access-is-denied%3Fforum%3DwinserverTS%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebut%20as%20i%20can%20see%20it%20is%20not%20related%20to%20our%20issue..RD%20is%20terminated%20-%20is%20not%20the%20same%20that%20we%20have.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20always%20get%20a%20new%20session%2C%20no%20matter%20what%20happened%20(resize%2C%20short%20internet%20outage%2C%20etc).%3C%2FP%3E%3CP%3EJust%20not%20possible%20to%20connect%20to%20previously%20running%20session%2C%20when%20this%20feature%20is%20enabled.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3ESergii%20Vinnikov%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-822263%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-822263%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F167708%22%20target%3D%22_blank%22%3E%40Vinz%20Focker%3C%2FA%3E%3C%2FP%3E%3CP%3EWe%20have%20the%20same%20Problem%20with%20a%20Production%20Windows%202019%20Server%20(Build%2017763)%3C%2FP%3E%3CP%3ELocking%20the%20Session%20before%20disconnecting%20does%20seem%20to%20help%2C%20but%20is%20not%20a%20usable%20workaround%20for%20us.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1328882%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1328882%22%20slang%3D%22en-US%22%3E%3CP%3EI%20do%20facing%20the%20same%20issues%20where%20when%20i%20try%20to%20connect%20to%20newly%20deployed%20server%202019%20each%20time%20its%20establishing%20a%20new%20session%20instead%20of%20connecting%20back%20to%20new%20session%20and%20the%20session%20count%20is%20keep%20increasing.%20Have%20tried%20to%20applied%20the%20solution%20as%20per%20below%20but%20didn't%20work%20through.%20Is%20it%20really%20a%20bug%20with%20server%202019%20or%20something%20i%20need%20to%20look%20for%3F%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-server%2Fremote%2Fremote-desktop-services%2Ftroubleshoot%2Frdp-client-disconnects-cannot-reconnect-same-session%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-server%2Fremote%2Fremote-desktop-services%2Ftroubleshoot%2Frdp-client-disconnects-cannot-reconnect-same-session%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1329020%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1329020%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F632734%22%20target%3D%22_blank%22%3E%40hari4a3%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eno%26nbsp%3B%3CSTRONG%3EComputer%20Configuration%5CWindows%20Settings%5CSecurity%20Settings%5CLocal%20Policies%5CSecurity%20Options%20-%20different%20options%20not%20working%20for%20us%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3Ekeepalive%20-%20also%20not%20helpful.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3Eeven%20with%20%22Disconnected%22%20session%20-%20you%20will%20never%20get%20this%20session%20back%20with%20current%20bug%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1383584%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1383584%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F167708%22%20target%3D%22_blank%22%3E%40Vinz%20Focker%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20the%20solution%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fmedium.com%2F%40moshecombr%2Fwindows-2019-rdp-rdsh-not-able-reconnect-to-disconnected-session-every-time-new-session-a1891df6e9c8%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmedium.com%2F%40moshecombr%2Fwindows-2019-rdp-rdsh-not-able-reconnect-to-disconnected-session-every-time-new-session-a1891df6e9c8%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3Egpmc.msc%20%E2%80%94%20Edit%20users%20policies%E2%80%94%20User%20Configuration%20%E2%80%94%20Policies%20%E2%80%94%20Administrative%20Templates%20%E2%80%94%20All%20Settings%20%E2%80%94%20Remove%20Lock%20Computer%20%E2%80%94%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22gn%20iu%22%3EChange%20to%20Enabled%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1383586%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1383586%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F167708%22%20target%3D%22_blank%22%3E%40Vinz%20Focker%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20the%20solution%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fmedium.com%2F%40moshecombr%2Fwindows-2019-rdp-rdsh-not-able-reconnect-to-disconnected-session-every-time-new-session-a1891df6e9c8%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmedium.com%2F%40moshecombr%2Fwindows-2019-rdp-rdsh-not-able-reconnect-to-disconnected-session-every-time-new-session-a1891df6e9c8%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Egpmc.msc%20%E2%80%94%20Edit%20users%20policies%E2%80%94%20User%20Configuration%20%E2%80%94%20Policies%20%E2%80%94%20Administrative%20Templates%20%E2%80%94%20All%20Settings%20%E2%80%94%20Remove%20Lock%20Computer%20%E2%80%94%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22gn%20iu%22%3EChange%20to%20Enabled%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1384123%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1384123%22%20slang%3D%22en-US%22%3EThanks%20for%20sharing%20this%20Vinz!%20Will%20test%20it%20nearest%20time%20and%20report%20back%20if%20it%20will%20help%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1388533%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1388533%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F333155%22%20target%3D%22_blank%22%3E%40sergiiV2285%3C%2FA%3E%26nbsp%3B%26nbsp%3BI%20have%20tried%20that%20solution%20but%20didn't%20work.%20Did%20you%20tired%20at%20your%20end.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1388893%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1388893%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F665130%22%20target%3D%22_blank%22%3E%40MosheSI%3C%2FA%3E%26nbsp%3B%26nbsp%3BAwesome!%20Thanks%20a%20lot!%3CBR%20%2F%3EAnother%20way%20is%20setting%20the%20DisableLockWorkstation%20Registry%20Value%20to%201%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EWindows%20Registry%20Editor%20Version%205.00%0A%0A%5BHKEY_LOCAL_MACHINE%5CSOFTWARE%5CMicrosoft%5CWindows%20NT%5CCurrentVersion%5CWinlogon%5D%0A%22DisableLockWorkstation%22%3Ddword%3A00000001%0A%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1388936%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1388936%22%20slang%3D%22en-US%22%3EDon't%20thank%20me.%20It%20is%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F665130%22%20target%3D%22_blank%22%3E%40MosheSI%3C%2FA%3E%20who%20deserves%20all%20the%20glory%20%3B)%3C%2Fimg%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

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.

 

15 Replies
Highlighted
I wonder why there is no feedback for a proper bug report. Is this forum actually the right place to report bugs ?
Highlighted

The bug still happens with Windows Server 2019 Insider Preview Build 17723

Highlighted

The same problem still exist. 

Highlighted

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

Highlighted

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

 

https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/ff...)

 

 

Highlighted

@ScottMoore 

 

You mentioned some story (link was broken, i found it via search)..

https://social.technet.microsoft.com/Forums/windowsserver/en-US/68dfb072-9192-4f5e-a9e3-d75298d9f971...

 

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

Highlighted

@Vinz Focker

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.

 

Highlighted

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?

https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/troubleshoot/rdp-clie...

Highlighted

@hari4a3 

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

Highlighted
Best Response confirmed by Vinz Focker (Occasional Contributor)
Solution

@Vinz Focker 

 

Here is the solution:

 

https://medium.com/@moshecombr/windows-2019-rdp-rdsh-not-able-reconnect-to-disconnected-session-ever...

 

gpmc.msc — Edit users policies— User Configuration — Policies — Administrative Templates — All Settings — Remove Lock Computer — Change to Enabled

Highlighted

@Vinz Focker 

 

Here is the solution:

https://medium.com/@moshecombr/windows-2019-rdp-rdsh-not-able-reconnect-to-disconnected-session-ever...

gpmc.msc — Edit users policies— User Configuration — Policies — Administrative Templates — All Settings — Remove Lock Computer — Change to Enabled

Highlighted
Thanks for sharing this Vinz! Will test it nearest time and report back if it will help
Highlighted

@sergiiV2285  I have tried that solution but didn't work. Did you tired at your end.

Highlighted

@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

 

Highlighted
Don't thank me. It is @MosheSI who deserves all the glory ;)