0

The versions of MsRdpClient are 9, 8, 7, and in the provided code, 2. Per plenty of other posts on StackOverflow this code should connect me to my computer (RDP is enabled) and show me the log in screen.

I apologize for not including more information, but I'm at a loss as to why this doesn't work.

using System;
using System.Windows.Forms;

namespace MsTscTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            axMsRdpClient2NotSafeForScripting1.Server = "127.0.0.1";
            axMsRdpClient2NotSafeForScripting1.Connect();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            axMsRdpClient2NotSafeForScripting1.Disconnect();
        }
    }
}
  • 2
    Errors are reported through events, not exceptions. If you don't subscribe any then you can't find out. – Hans Passant Nov 09 '17 at 08:18
  • @HansPassant: To my knowledge I do not receive any events, save for if I attempt to disconnect (never connected) or if I click the connect button too quickly (already connecting). I have looked through the events associated with `MsRdpClient2NotSafeForScripting` and do not see any I should be looking at. Another answer suggested `OnAuthenticationWarningDisplayed`, (I may need to install a self-signed certificate) but that does not fire. `OnConnecting` does fire properly, but I am not sure how to obtain more information. –  Nov 09 '17 at 18:08

0 Answers0