Sketched this code, but for some reason it does not display the result, although if I am connected via RDP to the server and connect to it through this program, it throws me out but in the program it displays an error:
using System; using System.Threading; using MSTSCLib; namespace test { class Program { static void Main(string[] args) { try { var rdp = new MSTSCLib.MsRdpClient8(); rdp.Server = "6.6.16.6";// host.Text; rdp.UserName = "admin"; // login.Text; rdp.AdvancedSettings2.ClearTextPassword = "admin"; rdp.AdvancedSettings7.EnableCredSspSupport = true; rdp.Connect(); if (rdp.Connected.ToString() == "1" ) { rdp.Disconnect(); Console.WriteLine("good"); Console.ReadKey(); } else { Console.WriteLine("error"); Console.ReadKey(); } } catch (Exception) { // Console.ReadKey(); } } } }
Connected
? - rdorn