Lately I’ve been having connection issues with a workstation on a remote network.
The remote computer would always accept the connection and show the desktop but it would sporadically give me: “The connection has been lost. Attempting to reconnect to your session…” pop-up and freeze.

After a few seconds it would reconnect and work fine for a few seconds/minutes and then lock-up again. This issue would only occur when connecting from a Windows Vista or Windows 7 workstation, but not from Windows XP.

I searched the interwebs for a solution and figured out the cause for the issue.

The remote computer had its RDP-port changed from 3389 to 443 to bypass firewall restrictions from the corporate network.
This would case certain Windows features to misinterpret the traffic and interfere with the connection.

Anyway, the cause for my specific issue was “Windows Auto-Tuning” (first introduced in Windows Vista), it was breaking (“optimizing”) the remote desktop traffic.

To shut this feature off simply open a command-prompt with elevated privileges and type:

netsh interface tcp set global autotuninglevel=disabled

There is no need to reboot your computer, it will turn the feature off immediately.
To re-enable the feature write:

netsh interface tcp set global autotuninglevel=normal