I have made an PPP dialer using C# & DOTRAS. When I enter wrong username and password, I get this exception error.
RasExecption occured: The remote connection was denied because the user name and password combination you provided is not recognized, or the selected authentication protocol is not permitted on the remote access server.
RASEXCEPTION dueto incorrect user/pass
I have tried to catch this error and make it appear in text box, but failed.
var conns = RasConnection.GetActiveConnections();
var conn = conns.FirstOrDefault(o => o.EntryName == Globals.PPPNAME);
if (conn != null)
{
this.StatusTextBox.AppendText(string.Format("{0}\r\n\r\n", "Dialer already connected !"));
}
else
try
{
this.rasDialer1.DialAsync();
}
catch(RasException ex)
{
this.StatusTextBox.AppendText("\r\n" + ex.Message + "USERNAME PASSWORD IS INVALID...");
}