locked
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 = "225.123.234.112"
                connectorRDP.UserName = "UserName";
                IMsTscNonScriptable secured = (IMsTscNonScriptable)connectorRDP.GetOcx();
                secured.ClearTextPassword = "Password";          
                connectorRDP.Connect();
            }

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

    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

Answers

All replies