Search code examples
c#tcpremote-desktoprdpterminal-services

How to Generate Static Connection String by Remote desktop Protocol


I have implemented Remote desktop Protocol terminal services in c#. Server generates the connection string and client uses this connection string to connect with a server.

The problem is that each time i start a server , a new connection string is generated. is there any way that we could generate a static connection string .

My both PC are connected with wire with each other...


Solution

  • In the connection string, there is global ipv6 address as seen starting with prefix "2001:". This address changes if the machine reboots or the internet ipv4 address changes after which the connection string is not valid. Windows has PNRP names which are 128-bit unique name to a computer & resolves to appropriate ipv6 address using p2p DNS resolving mechanism. You can check the below link to find out the pnrp name of your computer using which you can RDP to it any time. https://technet.microsoft.com/en-us/library/bb962088.aspx