I'm trying to use the Windows login credentials on a DotRas VPN connection. This is what I've tried so far, without any luck:
this.rasDialer.Credentials = CredentialCache.DefaultNetworkCredentials;
this.rasDialer.DialAsync();
and:
this.rasDialer.Credentials = (NetworkCredential) CredentialCache.DefaultCredentials;
this.rasDialer.DialAsync();
I'm getting error code 691 when I'm trying to connect, which is the same error code I get when I'm trying with a blank username and a blank password:
this.rasDialer.Credentials = new NetworkCredential("", "");
this.rasDialer.DialAsync();
This gives me error code 13801:
this.rasDialer.Credentials = new NetworkCredential("dummy", "dummy");
this.rasDialer.DialAsync();
Thanks for any help solving this.
Error code 691 indicates a general authentication failure message from RAS, so if you're seeing that when you're not passing in credentials that would probably be expected.
Per Microsoft's documentation found here:
Your ability to use the CredentialCache.DefaultNetworkCredentials property would likely be determined by the settings within the phone book for your connection given that the settings on what the entry can support would likely enable or prevent the use of the property you're attempting to use.
As for what the error 13801 represents, I have not seen that error before so I'm not sure. If I were to venture a guess, depending on your entry settings it could be EAP related. Most RAS related errors are between 600 and 800.
Hopefully the new version makes these sorts of issues less irritating to diagnose.