1

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

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

连接已建立。但是,当我尝试使用 Internet Explorer 时,它就失败了。

我尝试手动拨号以编程方式创建的条目,它说连接已建立。但在 Internet Explorer 中又一次失败了。

我使用的是 Windows 10。这里有什么我遗漏的吗?感谢帮助。

4

0 回答 0