Receiving "The connection was terminated because the remote computer did not respond in a timely manner."

Oct 10, 2012 at 5:27 PM
Edited Oct 10, 2012 at 5:37 PM

Hey - I'm looking to VPN programatically using DotRas (great library, by the way, thank you!) and am consistently getting the exception "The connection was terminated because the remote computer did not respond in a timely manner."

The VPN connection works when i manually kick if off and manually enter my credentials without any further information necessary. RasDialing via cmd prompt does give me the error "Remote Access error 703 - The connection needs information from you, but the application does not allow user interaction."

Target OS: Win8; .Net 4 client profile 

Help! Thanks in advance.

Edit:
Seeing this in the event log:
"Skipping: Eap method DLL path validation failed. Error: typeId=26, authorId=0, vendorId=0, vendorType=0" 
And some VPN Connection Details that may be pertinent: PEAP, SSTP

Coordinator
Oct 11, 2012 at 7:04 AM
Edited Oct 11, 2012 at 7:08 AM

Couple things...

  1. Windows 8 is not yet a supported platform with 1.2, however given past OS updates and what I've seen in the upcoming Windows 8 changes I don't see why there should be any problems using it with the current version of DotRas.
  2. Are you using the RasDialer component to dial the connection?
  3. Have you tried using the RasDialDialog component to dial the connection? I've seen better success over the project lifetime using this when dealing with EAP. Could be Microsoft's implementation when using EAP requires the API used by this component in the project.
  4. If you hook to the StateChanged event on RasDialer, what does the state changes look like? It might be getting stuck on one of the states while it waits for user input.

The rasdial.exe product provided by Microsoft uses the same RasDial API that the RasDialer component uses, which may explain why you see the same problem in both places.

It could very well be a problem with EAP if you're using it and it wants additional information from the user. If something EAP wants requires something under the hood, you may be forced to use the RasDialDialog component instead, which is the same interface Windows uses. Given my non-existant ability to create EAP based VPNs that work under optimal conditions, there have been problems with EAP while using the project. I have no way of testing more advanced VPNs used primarily by corporate and government entities.

- Jeff

 Edit: I wanted to add... without compromising security, what do your PEAP settings look like for the client?