SOLVED

User's logged off when they disconnect their session

%3CLINGO-SUB%20id%3D%22lingo-sub-901822%22%20slang%3D%22en-US%22%3EUser's%20logged%20off%20when%20they%20disconnect%20their%20session%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-901822%22%20slang%3D%22en-US%22%3E%3CP%3EOur%20enviroment%20consists%20of%20the%20following%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E2%20x%20WVD%20Session%20hosts%20(Windows%2010)%3C%2FP%3E%3CP%3EProfiles%20stored%20on%20a%20file%20server%20in%20Azure%20and%20accessed%20from%20the%20session%20hosts%20via%20FXlogix%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUser's%20report%20that%20when%20they%20dissconnect%20from%20their%20session%20they%20would%20normally%20expect%20to%20be%20reconnected%20to%20the%20same%20session%20with%20all%20of%20their%20work%20%2F%20apps%20still%20open.%20This%20is%20not%20so%20much%20an%20issue%20for%20users%20in%20the%20office%2C%20but%20more%20for%20remote%20workers%20with%20unreliable%20internet%20connections%2C%20as%20when%20they%20are%20dissconnected%20even%20for%20a%20short%20period%2C%20they%20will%20be%20logged%20off%20their%20session%20and%20put%20onto%20a%20new%20one.%20We%20have%20not%20have%20this%20issue%20in%20the%20past%20with%20Citrix%20or%20RDS.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20anyone%20have%20any%20ideas%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-906548%22%20slang%3D%22en-US%22%3ERe%3A%20User's%20logged%20off%20when%20they%20disconnect%20their%20session%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-906548%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F420322%22%20target%3D%22_blank%22%3E%40ryanquiggin%3C%2FA%3E%20%3A%20Please%20review%20the%20timeout%20policies.%20See%20this%20article%20here%3A%26nbsp%3B%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-desktop%2Fset-up-customize-master-image%23configure-session-timeout-policies%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%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-desktop%2Fset-up-customize-master-image%23configure-session-timeout-policies%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-965503%22%20slang%3D%22en-US%22%3ERe%3A%20User's%20logged%20off%20when%20they%20disconnect%20their%20session%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-965503%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F420322%22%20target%3D%22_blank%22%3E%40ryanquiggin%3C%2FA%3E%26nbsp%3BI'm%20actually%20having%20the%20exact%20same%20issue%20in%20testing.%20Did%20you%20ever%20get%20it%20fixed%3F%3C%2FP%3E%3CP%3EWhat's%20happening%20for%20me%20is%20that%20if%20a%20user%20disconnects%20their%20session%20stays%20logged%20in%20in%20a%20disconnected%20state%20as%20you%20can%20see%20in%20task%20manager.%20But%20when%20they%20log%20back%20in%20you%20can%20see%20in%20the%20fslogix%20operational%20log%20that%20fslogix%20unloads%20the%20profile%20and%20then%20loads%20it%20again.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-965545%22%20slang%3D%22en-US%22%3ERe%3A%20User's%20logged%20off%20when%20they%20disconnect%20their%20session%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-965545%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F211717%22%20target%3D%22_blank%22%3E%40David%20Brophy%3C%2FA%3E%26nbsp%3BIn%20the%20end%2C%20I%20created%20a%20new%20VM%20image%20from%20scratch%20using%20the%20Windows%2010%20Multisession%20%2BOffice%20365%20apps%20built%20into%20the%20WVD%20deployment%20template.%20This%20resolved%20the%20issue.%20I%20think%20previously%20I%20used%20the%20Windows%2010%20Multisession%20image%20without%20the%20365%20apps%20and%20thats%20what%20gave%20me%20issues.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-965558%22%20slang%3D%22en-US%22%3ERe%3A%20User's%20logged%20off%20when%20they%20disconnect%20their%20session%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-965558%22%20slang%3D%22en-US%22%3EThanks%2C%20I'll%20give%20that%20a%20try.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-965662%22%20slang%3D%22en-US%22%3ERe%3A%20User's%20logged%20off%20when%20they%20disconnect%20their%20session%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-965662%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F420322%22%20target%3D%22_blank%22%3E%40ryanquiggin%3C%2FA%3E%26nbsp%3BI%20figured%20it%20out.%20I%20was%20following%20the%20article%20described%20at%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-desktop%2Fset-up-customize-master-image%23software-preparation-and-installation%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-desktop%2Fset-up-customize-master-image%23software-preparation-and-installation%3C%2FA%3E%26nbsp%3Bwhich%20references%20the%20below%20registry%20entries.%20I%20deleted%20them%20from%20my%20VM%20and%20all%20good%20now.%20I'd%20imagine%20it%20was%20the%26nbsp%3BRemoteAppLogoffTimeLimit%20set%20to%200.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ereg%20add%20%22HKLM%5CSOFTWARE%5CPolicies%5CMicrosoft%5CWindows%20NT%5CTerminal%20Services%22%20%2Fv%20RemoteAppLogoffTimeLimit%20%2Ft%20REG_DWORD%20%2Fd%200%20%2Ff%3CBR%20%2F%3Ereg%20add%20%22HKLM%5CSOFTWARE%5CPolicies%5CMicrosoft%5CWindows%20NT%5CTerminal%20Services%22%20%2Fv%20fResetBroken%20%2Ft%20REG_DWORD%20%2Fd%201%20%2Ff%3CBR%20%2F%3Ereg%20add%20%22HKLM%5CSOFTWARE%5CPolicies%5CMicrosoft%5CWindows%20NT%5CTerminal%20Services%22%20%2Fv%20MaxConnectionTime%20%2Ft%20REG_DWORD%20%2Fd%2010800000%20%2Ff%3CBR%20%2F%3Ereg%20add%20%22HKLM%5CSOFTWARE%5CPolicies%5CMicrosoft%5CWindows%20NT%5CTerminal%20Services%22%20%2Fv%20RemoteAppLogoffTimeLimit%20%2Ft%20REG_DWORD%20%2Fd%200%20%2Ff%3CBR%20%2F%3Ereg%20add%20%22HKLM%5CSOFTWARE%5CPolicies%5CMicrosoft%5CWindows%20NT%5CTerminal%20Services%22%20%2Fv%20MaxDisconnectionTime%20%2Ft%20REG_DWORD%20%2Fd%205000%20%2Ff%3CBR%20%2F%3Ereg%20add%20%22HKLM%5CSOFTWARE%5CPolicies%5CMicrosoft%5CWindows%20NT%5CTerminal%20Services%22%20%2Fv%20MaxIdleTime%20%2Ft%20REG_DWORD%20%2Fd%2010800000%20%2Ff%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1057188%22%20slang%3D%22en-US%22%3ERe%3A%20User's%20logged%20off%20when%20they%20disconnect%20their%20session%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1057188%22%20slang%3D%22en-US%22%3E%3CP%3ERemote%20app%20logoff%20limit%20makes%20sure%20the%20session%20is%20logged%20off%20when%20all%20programs%20are%20closed%20(hence%20remote%20app).%3CBR%20%2F%3E%3CBR%20%2F%3EDisconnect%20time%205000%20should%20be%20much%20longer%20(this%20is%20less%20than%20a%20minute!)%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgetadmx.com%2F%3FCategory%3DWindows_8.1_2012R2%26amp%3BPolicy%3DMicrosoft.Policies.TerminalServer%3A%3ATS_SESSIONS_Disconnected_Timeout_1%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgetadmx.com%2F%3FCategory%3DWindows_8.1_2012R2%26amp%3BPolicy%3DMicrosoft.Policies.TerminalServer%3A%3ATS_SESSIONS_Disconnected_Timeout_1%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EActive%20session%20time%20is%20also%20set%20to%203%20hours%2C%20users%20getting%20logged%20out%20at%2011am%20when%20they%20start%20at%208am.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgetadmx.com%2F%3FCategory%3DWindows_8.1_2012R2%26amp%3BPolicy%3DMicrosoft.Policies.TerminalServer%3A%3ATS_SESSIONS_Limits_1%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgetadmx.com%2F%3FCategory%3DWindows_8.1_2012R2%26amp%3BPolicy%3DMicrosoft.Policies.TerminalServer%3A%3ATS_SESSIONS_Limits_1%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EChanged%20this%20to%2016%20hours%20in%20my%20environment.%20I%20see%20that%20the%20referenced%20ms%20docs%20is%20no%20longer%20mentioning%20these%20registry%20keys%20(probably%20for%20a%20reason%3F).%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EGood%20luck%20with%20your%20environment!%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Our enviroment consists of the following;

 

2 x WVD Session hosts (Windows 10)

Profiles stored on a file server in Azure and accessed from the session hosts via FXlogix

 

User's report that when they dissconnect from their session they would normally expect to be reconnected to the same session with all of their work / apps still open. This is not so much an issue for users in the office, but more for remote workers with unreliable internet connections, as when they are dissconnected even for a short period, they will be logged off their session and put onto a new one. We have not have this issue in the past with Citrix or RDS.

 

Does anyone have any ideas?

6 Replies
Highlighted
Best Response confirmed by Eva Seydl (Microsoft)
Highlighted

@ryanquiggin I'm actually having the exact same issue in testing. Did you ever get it fixed?

What's happening for me is that if a user disconnects their session stays logged in in a disconnected state as you can see in task manager. But when they log back in you can see in the fslogix operational log that fslogix unloads the profile and then loads it again.

Highlighted

@David Brophy In the end, I created a new VM image from scratch using the Windows 10 Multisession +Office 365 apps built into the WVD deployment template. This resolved the issue. I think previously I used the Windows 10 Multisession image without the 365 apps and thats what gave me issues.

Highlighted
Thanks, I'll give that a try.
Highlighted

@ryanquiggin I figured it out. I was following the article described at https://docs.microsoft.com/en-us/azure/virtual-desktop/set-up-customize-master-image#software-prepar... which references the below registry entries. I deleted them from my VM and all good now. I'd imagine it was the RemoteAppLogoffTimeLimit set to 0.

 

reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v RemoteAppLogoffTimeLimit /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fResetBroken /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v MaxConnectionTime /t REG_DWORD /d 10800000 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v RemoteAppLogoffTimeLimit /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v MaxDisconnectionTime /t REG_DWORD /d 5000 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v MaxIdleTime /t REG_DWORD /d 10800000 /f

Highlighted

Remote app logoff limit makes sure the session is logged off when all programs are closed (hence remote app).

Disconnect time 5000 should be much longer (this is less than a minute!)

https://getadmx.com/?Category=Windows_8.1_2012R2&Policy=Microsoft.Policies.TerminalServer::TS_SESSIO...

Active session time is also set to 3 hours, users getting logged out at 11am when they start at 8am.

https://getadmx.com/?Category=Windows_8.1_2012R2&Policy=Microsoft.Policies.TerminalServer::TS_SESSIO...

 

Changed this to 16 hours in my environment. I see that the referenced ms docs is no longer mentioning these registry keys (probably for a reason?).


Good luck with your environment!