How to recognize when logon fails in RDP / MSTSC?
问题 I am working on a C# implementation of RDP / MSTSC using the MsRdpClient9NotSafeForScripting class. I need to recognize when the user logon failed due to wrong credentials. The event OnLogonError should do the job but it doesn't fire (at least not on Server 2016), while the other events seem to work properly. From the Microsoft documentation of OnLogonError : LOGON_FAILED_BAD_PASSWORD (0 (0x0)) The logon failed because the logon credentials are not valid. The behaviour (not fireing