C# 在Windows 10上使用Ras库成功拨号连接,但Internet连接失败
我正在使用DotRas库,创建RasDevice、Rasentry,将Rasentry添加到RasPhoneBook,最后调用RasDialer.Dial() 连接已建立。然而,当我尝试使用internet explorer时,它关闭了 我尝试手动拨号程序创建的条目,它说连接已建立。但在InternetExplorer中,它再次关闭 我正在使用Windows10。这里有我遗漏的东西吗? 谢谢你的帮助C# 在Windows 10上使用Ras库成功拨号连接,但Internet连接失败,c#,windows,ras,C#,Windows,Ras,我正在使用DotRas库,创建RasDevice、Rasentry,将Rasentry添加到RasPhoneBook,最后调用RasDialer.Dial() 连接已建立。然而,当我尝试使用internet explorer时,它关闭了 我尝试手动拨号程序创建的条目,它说连接已建立。但在InternetExplorer中,它再次关闭 我正在使用Windows10。这里有我遗漏的东西吗? 谢谢你的帮助 RasDevice device = RasDevice.GetDevices().Where(
RasDevice device = RasDevice.GetDevices().Where(o => o.Name == "(PPPOE)" && o.DeviceType == RasDeviceType.PPPoE).FirstOrDefault();
if (device != null)
{
MessageBox.Show("Found " + device.Name.ToString() + device.DeviceType.ToString(), "hah!", MessageBoxButtons.OK);
}
else
{
MessageBox.Show("Device not found", "Error", MessageBoxButtons.OK);
}
RasEntry entry = RasEntry.CreateDialUpEntry("Dialupnamexyz", "+880000000", device);
this.rasPhoneBook1.Entries.Add(entry);
this.rasDialer1.EntryName = EntryNameSet;
this.rasDialer1.PhoneBookPath = RasPhoneBook.GetPhoneBookPath(RasPhoneBookType.AllUsers); ;
this.rasDialer1.Credentials = new System.Net.NetworkCredential(userName, userPassword);
this.rasDialer1.DialAsync();