691 error on Windows 8.1 - need help

May 20, 2015 at 6:28 PM
I'm using DotRas to dial a local ISP (Internet Service Provider). When we try to connect we often get back error 691 "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. "

This appears to be a random occurrence since sometimes the dial-up works just fine and other times we get the 691 error. This is randomly happening on multiple Windows 8.1 tablets in different locations using different phone lines and calling different ISPs. Even though they call different ISPs its all the same user name and password because its a network of ISPs who share their local modem banks.

The whole point of writing this dialer using DotRas was to try to eliminate this 691 error that we were getting from RASDIAL. I had heard some people say RASPHONE solved the 691 errors on Windows 8, but RASPHONE does not appear to be an option for us because it doesn't have command line options to pass the phone number, user name, and password.

Any thoughts on how to determine what is causing the 691 and how to fix it?

DotRas is very nice and I've enjoyed using it. I hope it turns out we solve the problem and we continue using our own dialer we built with DotRas.

Thanks - Lou
May 20, 2015 at 9:03 PM
Could it be the ISP is not synchronizing there usernames etc. correctly/reliably?

I don't know much about 8.1 (yet!) but ISTM that RASDIAL is not any different than the API wrapped by DotRas.
May 21, 2015 at 1:32 AM
I'll be checking with my ISP.

It was a long shot that DotRas would solve my problem, but worth trying in case the error was due to something in the RASDIAL program and not the underlying DLLs.

I had read elsewhere that people with the 691 errors using RASDIAL on Windows 8 had solved the problem by switching to RASPHONE.

Unfortunately RASPHONE has not been an option for us because we need to use this on lots of PCs where we can't run RASPHONE to connect successfully once so it will store the credentials (user name and password) for later dialing and we haven't figured out how we can store the credentials remotely (like running a batch file or some other command to create the credentials).

Does RasDial have the ability to create the stored credentials RASPHONE uses? If so we could see if RASPHONE actually fixes the 691 error.
May 21, 2015 at 9:48 PM
Keith is correct that the RASDIAL.exe is more or less a wrapper around the RasDial API, and the RASPHONE.exe is more or less a wrapper around the RasPhoneBookDlg API. There are limitations to what the RasDial API is capable of doing in general from what I've noticed over the years, it does have problem handling some EAP scenarios. It's not unexpected that the same symptoms you're seeing from the RASDIAL.exe and the RasDialer class is the same. This could also be a symptom of incompatibility with the VPN server. I do know that I've seen problems hanging up with Linux systems in the past as well.

RasDial doesn't do anything specific with storing credentials, the RasDial API simply handles dialing as the name would imply. RasDialer has the ability to store credentials used by a connection if the option is enabled before dialing begins. It just uses a couple APIs to do it rather than just the one.
Jun 7, 2015 at 7:47 AM
Thought I'd update you to close this out.

The 691 errors were due to a change our ISP made. For years they had allowed us to connect multiple tablets at the same time using the same account. They changed this a few months ago without telling anyone so if a second tablet tried to connect while one was still online, it was rejected with a 691 error.

To solve the problem we have gotten a second account from another ISP, scheduled our tablets to prevent overlapped connections, and modified our DotRas application to use the alternate ISP account should the first one fail.

If we were to get additional accounts from the same ISP, is there a way to have DotRas try multiple sets of credentials without redialing? In other words, we dial our ISP and get a connection, try username and password one (which is already in use by another tablet and the ISP returns 691) so DotRas sends the username and password for a second account with this same ISP without redialing the connection.
Jun 9, 2015 at 2:41 AM
Unfortunately no, the credentials that Microsoft exposed only allows for a single set of credentials to be used while dialing a connection. You'll just have to handle it as you have been within your application code so it behaves how you need it to.