Windows Remote Desktop: "configuring remote session" closes without error

I have a desktop/laptop pair at home operating x64 Windows 7 (the desktop was upgraded from Windows Vista, works just fine). I remote desktop to them on a daily basis when outside.

In recent weeks, I would occasionally fail to connect to my desktop. It can connect and authenticate fine, but the "configuring remote session" dialog would simply close and not show me the desktop window or any error message.

There is no error event log relating to this on the desktop computer.

Some suggestions call for disabling remote audio, which mine already is, but trying different audio modes did not yield any different result.

I am not too sure if this is related to video card drivers (they do get auto-updated), since remote desktop video is supposed to steer via a virtual device driver? Nonetheless the desktop operates three monitors via an ATI Radeon HD5770 (1 Displayport, 2 DVI). I do not see a real problem with that since I can mostly connect and operate it remotely.

I try to "remote tunnel" via my home laptop but obviously won't work either as the problem lies in the desktop. What other conditions can cause remote desktop to break without error?

UPDATE I came home and still couldn't connect to the desktop until I restarted the entire system.


Solution 1:

I started having a similar problem out of the blue on a PC at work--it connected and just hung there at the 'configuring remote session' window.

I found that I needed to go into the options under the 'Experience' tab and de-select the Persistent Bitmap Caching setting.

Once I disabled that setting I was able to connect quickly as expected.

Solution 2:

This can also happen if you have initiated a large Windows Update that is not yet fully configured or if the computer is not yet fully restarted. You can not remote to the desktop but the IIS might still receive and return responses for example. In this case all you need to do is wait.

A good thing to try is also deleting %localappdata%\Microsoft\Terminal Server Client\Cache and restarting your computer as mentioned by @JohnLBevan in comments.

Solution 3:

Cannot remember when but I guess one of those eventual Windows updates patched this problem.

Solution 4:

If you could not log in to the server using rdp, but your remote server is not being in state of rebooting, shutting down or starting with updates being installed, than the reason could be the lack of RAM or, maybe disk space.

In my case I was using psexec to connect to my server and verify if I have enough RAM on it:

c:\PSTools>PsExec.exe -u mydomain\user1 \\file-server.contoso.com -h c:\windows\system32\cmd

PsExec v2.2 - Execute processes remotely
Copyright (C) 2001-2016 Mark Russinovich
Sysinternals - www.sysinternals.com

Password:

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\Windows\system32>tasklist

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
System Idle Process              0 Services                   0          4 K
System                           4 Services                   0        140 K
smss.exe                       436 Services                   0      1,232 K
csrss.exe                      596 Services                   0      3,204 K
wininit.exe                    680 Services                   0      2,992 K
csrss.exe                      688 Console                    1      3,692 K
winlogon.exe                   740 Console                    1      8,600 K
services.exe                   816 Services                   0     12,016 K
lsass.exe                      824 Services                   0     41,116 K
svchost.exe                    928 Services                   0     15,240 K
svchost.exe                    992 Services                   0     12,312 K
svchost.exe                    812 Services                   0     55,608 K
dwm.exe                        972 Console                    1     16,932 K
svchost.exe                    404 Services                   0     27,708 K
svchost.exe                    544 Services                   0     18,568 K
svchost.exe                   1064 Services                   0     19,720 K
svchost.exe                   1208 Services                   0     22,576 K
svchost.exe                   1336 Services                   0     19,028 K
svchost.exe                   1468 Services                   0      3,336 K
WUDFHost.exe                  1544 Services                   0      7,928 K
svchost.exe                   1820 Services                   0      5,096 K
spoolsv.exe                   2068 Services                   0     15,316 K
LiteAgent.exe                 2168 Services                   0      4,724 K
amazon-ssm-agent.exe          2176 Services                   0     15,340 K
pg_ctl.exe                    2216 Services                   0      6,300 K
svchost.exe                   2448 Services                   0     17,464 K
nfssvc.exe                    2468 Services                   0      6,396 K
svchost.exe                   2476 Services                   0     12,668 K
svchost.exe                   2512 Services                   0     15,608 K
MsMpEng.exe                   2548 Services                   0    128,684 K
svchost.exe                   2564 Services                   0      9,004 K
conhost.exe                   3172 Services                   0      9,208 K
svchost.exe                   4792 Services                   0      5,052 K
GoogleCrashHandler.exe        2768 Services                   0      1,312 K
GoogleCrashHandler64.exe      5008 Services                   0      1,088 K
msdtc.exe                     6676 Services                   0      4,980 K
SearchIndexer.exe             1912 Services                   0 14,087,944 K
csrss.exe                     3552                            4      9,164 K
winlogon.exe                  6364                            4      5,228 K
dwm.exe                       5020                            4     20,492 K
rdpclip.exe                   4348                            4      7,068 K
sihost.exe                    6532                            4     16,360 K
svchost.exe                   2620                            4     19,936 K
explorer.exe                   916                            4     94,164 K
Taskmgr.exe                   5652                            4     16,220 K
dllhost.exe                   5900                            4      9,716 K
mmc.exe                       6220                            4     15,684 K
conhost.exe                   6740 Services                   0      3,184 K
backgroundTaskHost.exe        2560                            4      2,128 K
RuntimeBroker.exe             5612                            4     26,880 K
svchost.exe                   5600 Services                   0     13,836 K
taskhostw.exe                 4308                            4     10,928 K
NisSrv.exe                    5264 Services                   0     10,156 K
SearchProtocolHost.exe        6316 Services                   0     10,548 K
SearchFilterHost.exe          6620 Services                   0      7,180 K
svchost.exe                    588 Services                   0     54,936 K
cmd.exe                       2828 Services                   0     13,112 K
conhost.exe                   3540 Services                   0      9,204 K
MpCmdRun.exe                  3104 Services                   0     10,196 K
TotalCMD.exe                  6304 Services                   0     16,326 K
PSEXESVC.exe                  4748 Services                   0      6,908 K
cmd.exe                       3060 Services                   0      2,792 K
conhost.exe                   2664 Services                   0      9,496 K
tasklist.exe                  1988 Services                   0      7,784 K
WmiPrvSE.exe                  6204 Services                   0      8,600 K

C:\Windows\system32>

After I've killed some processes like this:

taskkill /f /im totalcmd.exe

I've been able to log in using rdp

Additionally, if you want to free some disk space, then open the file explorer or total commander and enter the next in the address bar (hitting Enter at the input end):

\\yourserveraddress\c$

Input that server's local admin credentials if required and after getting access, browse folders and remove unnecessary files to resolve the issue.

If you need to change some registry keys on that remote server, then open registry on your current machine and connect to the registry of the remote server:

File -> Connect Network Registry...

Specify remote computer name, better FQDN of your remote server and it would connect automatically if you have enough permissions.

I was able to perform all these actions inside of AD and having domain admin privileges and local admin privileges on the target server.

Additionally, if your remote server is very slow because of lack of RAM, than sign out other users from it remotely using psexec session:

C:\Windows\system32>query session
 SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE
>services                                    0  Disc
 console                                     1  Conn
 rdp-tcp#221       user1                     4  Active
 rdp-tcp                                 65536  Listen

C:\Windows\system32>logoff 4

Server I was saying about is 2016 with 16Gb of RAM and 30Gb of C disk space.