0
我正在用dotras dll启动应用程序。在应用程序中,我的主要目标是使用3g USB调制解调器连接到互联网。我加入我的代码如下:DotRas添加电话簿时出现未经授权的访问异常条目
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的新成员。那么需要哪些权限才能将条目添加到电话簿中?
任何想法?
只想添加,如果要存储的电话簿旁边的应用程序,你将不能够存储可以共享给所有用户凭据。自定义位置只允许存储每个用户的凭据。 – 2013-04-24 03:42:33