Windows Server 2012 R2 - Change RDP Port

6,409

Solution 1

A possible cause of the error "Because of a protocol error detected at the client code 0x1104 this session will be disconnected' is a conflict between the port you're trying to use and one already in use on your system.

You can run the command netstat -ano | findstr ":9999" (where 9999 is your port number) to find the PID of any running process listening on your port. The last column in the netstat output is the PID of the process. Use a tool like Sysinternals Process Explorer to find the process using the PID. If its not your process, then you've found your conflict, in which case you should configure Remote Desktop to listen on another port.

Solution 2

Double check your ports. It appears the the original port I chose was in use by another application. After trying another port I was able to get it working.

References for anyone else running into this problem:

and the official Microsoft KB: https://support.microsoft.com/en-us/help/306759/how-to-change-the-listening-port-for-remote-desktop

Share:
6,409

Related videos on Youtube

Vee
Author by

Vee

Updated on September 18, 2022

Comments

  • Vee
    Vee over 1 year

    This seems so simple following instructions on Microsoft and other Google results. Unfortunately after changing Reg Key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber and allowing the new port through the firewall, I get the dreaded 'Because of a protocol error detected at the client code 0x1104 this session will be disconnected'

    I've read several articles on fixing this; however, all of them require a domain, and this is a Standalone Windows Server 2012 R2 server at a hosting company (Go-Daddy).

    I'm sure there's something I'm missing, but I'm not sure what it is. Any help would be greatly appreciated. Thanks.

    • I say Reinstate Monica
      I say Reinstate Monica about 7 years
      What port number are you using? Have you tried any others?
    • Vee
      Vee about 7 years
      Thanks @Twisty I'm either a colossal idiot and used a port that was already assigned, or i fscked up somewhere in the process. Changed the port number and didn't have to rebuild the server from scratch!! Thanks again
    • Run5k
      Run5k about 7 years
      @Vee, glad to hear that your problem is resolved. You can submit your own answer as the solution and officially accept it after a 2-day waiting period. It may also be helpful if you described and referenced the Microsoft instructions that you followed.