Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp Find the SecurityLayer DWORD.
Indicates a failure to initiate the connection.
While RDP uses both TCP and UDP, the UDP stream is often the culprit for 0x904 errors on unstable connections. Forcing RDP to use only TCP often fixes the "Extended Error 0x7" timeout.
Here is a comprehensive guide to diagnosing and fixing this error. What Does Error 0x904 / 0x7 Actually Mean? In the world of Windows RDP: