I encountered a error with my application on Windows 7. Indeed, when I launch my program, there is an error after the creation of my RasEntry when I try to add it to the Phonebook.
/* Creation of the VPN External connection entry */
mp_ExternalEntry_O = RasEntry.CreateVpnEntry(VPNName, p_IPAddress_s, RasVpnStrategy.PptpFirst, RasDevice.GetDeviceByName("PPTP", RasDeviceType.Vpn, false));
/* Addition of the connection to the Phonebook */
mp_VPNPhoneBook_O.Entries.Add(mp_ExternalEntry_O); <== This line
The error message is:
"The caller does not have the required permission to perform the action requested"
So I figured that it was a problem with the access rights so I tried to launch my application with the "Run as administrator" parameter and it worked.
How can I execute my application without using the "run as administrator" mode ? Is it a problem due to my Phonebook ?
I execute these instructions for the Phonebook:
mp_VPNPhoneBook_O = new RasPhoneBook();
/* Opening of the Phone Book */
Thanks for your help !