Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/278.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在Windows 10上使用Ras库成功拨号连接,但Internet连接失败_C#_Windows_Ras - Fatal编程技术网

C# 在Windows 10上使用Ras库成功拨号连接,但Internet连接失败

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(

我正在使用DotRas库,创建RasDevice、Rasentry,将Rasentry添加到RasPhoneBook,最后调用RasDialer.Dial()

连接已建立。然而,当我尝试使用internet explorer时,它关闭了

我尝试手动拨号程序创建的条目,它说连接已建立。但在InternetExplorer中,它再次关闭

我正在使用Windows10。这里有我遗漏的东西吗? 谢谢你的帮助

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();