I can connect to vpn manually just fine each time.
I am trying to use c# to connect to a vpn.
I found this on SO,
How can I programmatically connect to a VPN?
Which shows to connect using this:
System.Diagnostics.Process.Start("rasdial.exe", "VPNName Username Password");
But this only seems to sometimes work. It either connects in about half a second and spends the next couple minutes going back and forth between Connecting to __.... and Verifying username and password... until it gives a remote access error 800.
This never happens when trying to connect normally with windows.
Any idea what might cause this issue and how to resolve it?