Connect to Remote desktop(RDP) with servername and port number using C# RRS feed

  • Question

  • Iam able to connect to Remote desktop(RDP) with IP address, Username and password using AxMsRdpClient5NotSafeForScripting class.

    For example:

            public void RDPConnect()

                 private AxMSTSCLib.AxMsRdpClient5NotSafeForScripting connectorRDP;

                connectorRDP.Server = ""
                connectorRDP.UserName = "UserName";
                IMsTscNonScriptable secured = (IMsTscNonScriptable)connectorRDP.GetOcx();
                secured.ClearTextPassword = "Password";          

    But i want to connect to a specific port of RDP like ""

    In above code,   connectorRDP.Server is not accepting ':'  and there is no option to set port number.

    Please give suggestions/ alternatives to do this in C#.

    Thanks in advance

    Monday, October 8, 2012 6:23 PM


All replies