When using remote desktop connection in Windows 11, error code 0x904 and extended error code 0x7
phenomenon
The external network connects to the remote desktop of the internal network host through the socks5 proxy enabled by the nps. It has been used well before. Since the upgrade of win11, it has been unable to connect. The error "This computer cannot connect to the remote computer. Please try to reconnect. If the problem persists, please contact the owner of the remote computer or the network administrator", "Error code: 0x904", "Extended error code: 0x7" is reported
processing method
Troubleshoot network problems (other computers on the same network are connected normally), which happens when this computer is connected
All the methods searched on the Internet are to close the firewall and let the firewall pass through the remote desktop. After testing, the connection is still unavailable.
I also suspect it is a firewall problem
Final solution
Open Windows Defender firewall settings -- allow applications to pass through the firewall
Change settings -- allow other apps
Browse
Enter C: WINDOWS system32 Directory selection mstsc.exe
Enter the directory h'qmstsc.exe in C: Windows SysWOW64
After adding, there is an additional remote desktop connection and a remote desktop connection in the list. Save after configuring network permissions
connect success!