Creating PPPoE connection

Apr 30, 2010 at 12:02 AM

Hello, All!

I want to create pppoe connection with visual basic 6 or visual studio 2010... My question is how to set 2 text boxes for insert username and password to pppoe connection. I have code that create pppoe connection but i can't set username and password to pppoe connection. Also I want to make checkbox to save username and password for all users on the computer... My Idea is based on my work in Internet Service Provider as php developer.

Coordinator
Apr 30, 2010 at 1:29 PM

"I want to create pppoe connection with visual basic 6 or visual studio 2010"

As of right now, this project is not accessible to COM so using it within Visual Basic 6 is out of the question. It must be used from a .NET language whose runtime is 2.0.50727 or later (Visual Studio 2005, 2008, or 2010).

"My question is how to set 2 text boxes for insert username and password to pppoe connection."

  1. If you want to store the credentials with the phonebook entry, you can use the UpdateCredentials method on the RasEntry object once you've added it to an opened phonebook. Also since you mentioned you wanted that checkbox to save the credentials for all users on the computer, that means you will need to use the phonebook in the All Users' profile. Along with that you'll need to use the WINXP or later build (see the documentation tab) since Windows doesn't support storing credentials for all users in the WIN2K build. That also means your application will not support Windows 2000 with this approach. The UpdateCredentials method on the WINXP or later build has an overload that will allow you to store the credentials for all users, see the SDK help documentation for more information.
  2. If you only want to pass the credentials while dialing, the RasDialer component does take credentials when dialing a connection. The Dial and DialAsync methods on the object both take a NetworkCredential object as an argument. This approach means you will need to ensure the credentials are stored securely using your own mechanism.

Hopefully that answers your questions.

Apr 30, 2010 at 2:49 PM
Edited Apr 30, 2010 at 2:50 PM

Yes this is possible, 2 weeks back, i created a complete PPPoE dialer solution for my own network, thanks to jeff, it was very well done.

It has following features.

  1. At start time it checks whether a connection is present or not, if it is not present it will tell so in a msgbox, if it is present then it will nothing.
  2. has two text boxes to set credentials (user name and password).
  3. has a check box for option save username and password.
  4. has a check box to set auto dial on startup.

todo list.

  1. show activity during dialing process.
  2. give error appropriate for refused connection.
  3. disable UAC through registry in vista and win 7.
  4. include a custom bandwidth meter in the dialer to show up/down transfer.
May 1, 2010 at 10:35 AM
Edited May 1, 2010 at 10:36 AM

Can you give me your complete solution code to view source of the username and password form. This solution is a little hard for me but i want to do this. Programming language that I know is PHP but the VB, VC, VCS i know a little bit

 

P.S. I can't speak english very well.

May 2, 2010 at 9:58 AM

dear to be honest, i dont have VS2008 installed right now, as soon as i will install it i will post the code.

Coordinator
May 2, 2010 at 3:05 PM

You'll want to contact each other directly if you're willing to send him the source code as there is no way to attach files directly to the threads in the forum. Also, I would advise against posting your email address here to prevent any unwanted spiders from picking up your email address for spamming. You can click the user name and use the contact feature CodePlex has available to open discussion with each other.

May 2, 2010 at 3:19 PM

you can contact me through my profile

May 8, 2010 at 3:41 PM

I already use DotRas, but my question is how to create pppoe connection, not vpn or dialup connection. Thanks all.

Coordinator
May 8, 2010 at 3:49 PM

Those static methods on RasEntry are not the only way you can create entries, they are only there to help set all the default information that Windows does when you create a connection. You can always use the RasEntry constructor to build an entry with any settings you need.

Also, this question was answered recently on another thread, see http://dotras.codeplex.com/Thread/View.aspx?ThreadId=208875

May 8, 2010 at 4:50 PM

Can You help me with this example in http://dotras.codeplex.com/Thread/View.aspx?ThreadId=208875 This is VB6 And I'm very happy with this..... I know better VB6.

 

Coordinator
May 8, 2010 at 4:56 PM

This project currently does not work with VB6, it's a .NET product as indicated on the home page.

May 8, 2010 at 5:37 PM

Can you send the source without mistakes. Finished project for creating Wan Miniport (pppoe) connection for Windows xp, Windows Vista and Windows 7. I have VS2008 and VS2010. All of the codes are logicaly and I find things which are help me.... but I don't understand ras functions and variables... Thanks.

Coordinator
May 8, 2010 at 6:38 PM

Sorry but I won't write your project for you, you'll need to do it on your own.

May 8, 2010 at 9:03 PM

Ok... Sorry for my question. Thanks.. I want only help or sample to do this ... with DotRas... I search for alternates.

Coordinator
May 8, 2010 at 9:11 PM

There are already examples available in the SDK download in both C# and VB.NET

May 8, 2010 at 9:18 PM

They give me some errors... Where can I download SDK without examples errors.

Coordinator
May 8, 2010 at 10:07 PM

There shouldn't be any errors in the examples in the SDK, they're compiled before each release to ensure there are no compile issues. Which example were you looking at that was having problems?

May 8, 2010 at 10:26 PM
Edited May 8, 2010 at 10:31 PM

http://images.hosting-bg.org/uploads/61955Untitled.png here is the errors.

Coordinator
May 9, 2010 at 2:04 AM

My apologies, I tested my copy as well and it has the same issue. To fix it, just remove the "using System.Linq;" line in Program.cs (it should be line 3). It'll compile after you do.

I thought I was doing compilation checks against the examples in 1.1, but apparently I didn't. Rest assured the 1.2 SDK has that as part of the build process to prevent those issues from arising again.