Click here to Skip to main content
15,881,559 members
Home / Discussions / C#
   

C#

 
GeneralRe: Install Windows Service Pin
Kevin Marois30-Mar-15 2:44
professionalKevin Marois30-Mar-15 2:44 
QuestionDbEntry Pin
Anele Ngqandu29-Mar-15 4:13
Anele Ngqandu29-Mar-15 4:13 
AnswerRe: DbEntry Pin
Dave Kreskowiak29-Mar-15 7:48
mveDave Kreskowiak29-Mar-15 7:48 
QuestionSelectednode.text is always null Pin
Member 1070832729-Mar-15 3:36
Member 1070832729-Mar-15 3:36 
QuestionHangMan C# need help! Pin
Munteanu Silviu28-Mar-15 7:21
Munteanu Silviu28-Mar-15 7:21 
AnswerRe: HangMan C# need help! Pin
Sascha Lefèvre28-Mar-15 8:23
professionalSascha Lefèvre28-Mar-15 8:23 
AnswerRe: HangMan C# need help! Pin
Bjørn8-Apr-15 4:24
Bjørn8-Apr-15 4:24 
QuestionPPPoe connection creation in c# Pin
KARFER28-Mar-15 4:00
KARFER28-Mar-15 4:00 
Hello Everyone,

I want to create PPPoE Connection.
I do this code but it doesn't work and i use the library DotRas ();
When I run the code the error appear in the line:
(RasEntry entry = RasEntry.CreateBroadbandEntry("osama",RasDevice.GetDeviceByName("(PPPoE Osama)",RasDeviceType.PPPoE)); )


and the error is: Value cannot be null.Parameter name: device


The is the Code...

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DotRas;

namespace WindowsFormsApplication2
{
   

    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }


   
        private void button1_Click(object sender, EventArgs e)
        {
            string path;
            path = RasPhoneBook.GetPhoneBookPath(RasPhoneBookType.User);

            using (RasPhoneBook pbk = new RasPhoneBook())
            {
                pbk.Open(path);
                
                RasEntry entry = RasEntry.CreateBroadbandEntry("osama",RasDevice.GetDeviceByName("(PPPoE Osama)",RasDeviceType.PPPoE));
                // Configure any options for your entry here via entry.Options
                pbk.Entries.Add(entry);
            }


            using (RasDialer dialer = new RasDialer()) 
            {
                dialer.EntryName = "Your Entry";
                dialer.PhoneBookPath = path;
                dialer.Credentials = new System.Net.NetworkCredential("User", "Password");
                dialer.Dial();
            }
        }
    }
}



If there is another way please tell me how.
-*-*-*-*-*-*-*-*-*
To Be Or Not To Be
(KARFER)
-*-*-*-*-*-*-*-*-*


modified 28-Mar-15 10:19am.

Questionlocalazation simulation Pin
huthiafa27-Mar-15 23:33
huthiafa27-Mar-15 23:33 
GeneralRe: localazation simulation Pin
Richard MacCutchan27-Mar-15 23:57
mveRichard MacCutchan27-Mar-15 23:57 
QuestionGlobal variable in C# Pin
aahamdan27-Mar-15 23:24
aahamdan27-Mar-15 23:24 
AnswerRe: Global variable in C# Pin
OriginalGriff28-Mar-15 0:27
mveOriginalGriff28-Mar-15 0:27 
GeneralRe: Global variable in C# Pin
aahamdan4-Apr-15 4:07
aahamdan4-Apr-15 4:07 
GeneralRe: Global variable in C# Pin
OriginalGriff4-Apr-15 4:26
mveOriginalGriff4-Apr-15 4:26 
AnswerRe: Global variable in C# Pin
Afzaal Ahmad Zeeshan28-Mar-15 17:32
professionalAfzaal Ahmad Zeeshan28-Mar-15 17:32 
GeneralRe: Global variable in C# Pin
aahamdan4-Apr-15 4:06
aahamdan4-Apr-15 4:06 
QuestionMobile agent data gathering in WSNs Pin
huthiafa27-Mar-15 22:25
huthiafa27-Mar-15 22:25 
QuestionEnumeration in C#,Different Input returning Same enumeration Pin
KK Kod27-Mar-15 5:01
KK Kod27-Mar-15 5:01 
AnswerRe: Enumeration in C#,Different Input returning Same enumeration Pin
Sascha Lefèvre27-Mar-15 5:16
professionalSascha Lefèvre27-Mar-15 5:16 
GeneralRe: Enumeration in C#,Different Input returning Same enumeration Pin
KK Kod27-Mar-15 5:25
KK Kod27-Mar-15 5:25 
AnswerRe: Enumeration in C#,Different Input returning Same enumeration Pin
Eddy Vluggen27-Mar-15 5:22
professionalEddy Vluggen27-Mar-15 5:22 
GeneralRe: Enumeration in C#,Different Input returning Same enumeration Pin
KK Kod27-Mar-15 5:26
KK Kod27-Mar-15 5:26 
GeneralRe: Enumeration in C#,Different Input returning Same enumeration Pin
Eddy Vluggen27-Mar-15 6:20
professionalEddy Vluggen27-Mar-15 6:20 
AnswerRe: Enumeration in C#,Different Input returning Same enumeration Pin
PIEBALDconsult27-Mar-15 15:52
mvePIEBALDconsult27-Mar-15 15:52 
QuestionImage segmentation - show or hide clusters Pin
Member 1133638227-Mar-15 4:15
Member 1133638227-Mar-15 4:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.