我正在使用 dotras dll 开发一个应用程序。在应用程序中,我的主要目标是使用 3g USB 调制解调器连接到互联网。我在下面添加我的代码:
    RasPhoneBook book = new RasPhoneBook();
    book.Open();
    dialer = new RasDialer();
    dialer.StateChanged += new EventHandler<StateChangedEventArgs>  (dialer_StateChanged);
    RasDevice device = RasDevice.GetDeviceByName("ZTE", RasDeviceType.Modem);
    RasEntry entry = RasEntry.CreateDialUpEntry("MyEntry", "*99#", device);
    entry.EncryptionType = RasEncryptionType.Optional;
    entry.Options.ModemLights = true;
    entry.NetworkProtocols.IP = true;
    entry.NetworkProtocols.Ipx = false;
    book.Entries.Add(entry);
    dialer.PhoneBookPath = book.Path;
    dialer.EntryName = "MyEntry";
    dialer.Dial();
当我尝试将电话簿添加到我的条目时,它返回异常:
UnauthorizedAccessException was Unhandled
调用者没有执行请求的操作所需的权限。
我是 DotRas 的新手。那么向电话簿添加条目需要哪些权限?
有任何想法吗?