Connect to Win10 using axmstsclib and C# with RDP

1

So I have a small C# app that has a host and a password and wants to connect to that host, which is running out of the box Windows 10. The problem is that I get a dialog saying the

host requires a password.

Previously connecting to Windows 7 boxes was no problem as the security was negotiated automatically. Now using the below code with AxMsRdpClient9 it appears I cannot connect. I'm trying to figure out what combination of settings I need to apply to use a predetermined password to RDP to a windows 10 box without user interaction. Thanks!

rdpViewer.AdvancedSettings2.RDPPort = port;
rdpViewer.AdvancedSettings8.ClearTextPassword = password;
rdpViewer.AdvancedSettings3.ConnectToServerConsole = true;
rdpViewer.AdvancedSettings8.ConnectToAdministerServer = true;
rdpViewer.AdvancedSettings8.EnableAutoReconnect = true;
rdpViewer.AdvancedSettings8.RedirectDrives = true;
rdpViewer.AdvancedSettings8.GrabFocusOnConnect = true;
rdpViewer.AdvancedSettings8.DisplayConnectionBar = true;
rdpViewer.AdvancedSettings8.EnableWindowsKey = 1;
rdpViewer.AdvancedSettings8.DisableCtrlAltDel = 1;
rdpViewer.AdvancedSettings8.allowBackgroundInput = 1;
rdpViewer.AdvancedSettings8.AcceleratorPassthrough = 1;
rdpViewer.AdvancedSettings8.BitmapPeristence = 1;
rdpViewer.AdvancedSettings8.Compress = 1;
rdpViewer.AdvancedSettings8.DoubleClickDetect = 1;                
rdpViewer.AdvancedSettings2.PerformanceFlags |= 0x00000080; //TS_PERF_ENABLE_FONT_SMOOTHING;
rdpViewer.Connect();
c#
rdp
asked on Stack Overflow Aug 18, 2016 by Richthofen • edited Aug 18, 2016 by MethodMan

1 Answer

2

Try to set EnableCredSspSupport to true. Something like this:

  axMsRdpClient6NotSafeForScripting1.AdvancedSettings7.EnableCredSspSupport = true;
answered on Stack Overflow Aug 24, 2016 by iz25

User contributions licensed under CC BY-SA 3.0