Can't Update Credentials

Nov 15, 2016 at 3:41 PM
Edited Nov 15, 2016 at 3:57 PM
i try to update the vpn credentials.

i try it with :

RasPhoneBook phoneBook = new RasPhoneBook();

RasEntryCollection rasEC = phoneBook.Entries;

if (rasEC.Contains(ConnectionName))
entry.UpdateCredentials(new System.Net.NetworkCredential(UserName, Password), true);

If i create a new connetcion without credentials, my code is working. But when i try to update the credentials from a existing vpn connection the password will not be updated.

thanks manuel
Nov 7 at 2:11 PM
If you set true as a second param to UpdateCredentials those will be set for AllUsers (but I'm unsure if and does that apply to the current user as well)...
Has anyone else had this problem and a solution to it please? I'm having similar issues, but still not sure whether it's my bad use of DotRas or something else to blame? Is there a way to check if the update has gone through in asserting .GetCredntials().Password with set password after the Update() call enough to be sure? TIA