This project is read-only.

Internet Connection Sharing

Apr 8, 2011 at 2:38 PM


I would like to share my internet connection. But i don't find the properties that enable this option.

i tested :


rasE = RasEntry.CreateVpnEntry("VPN1", "", RasVpnStrategy.PptpOnly, RasDevice.GetDeviceByName("PPTP", RasDeviceType.Vpn, false));

rasE.Options.SharedPhoneNumbers = true;

rasE.Options.SharePhoneNumbers = true;

But nothing changes.


Thx for help !


Kévin Damerval,


Apr 8, 2011 at 5:01 PM

Hello Kévin!

Do you want to share your Internet Connection or your VPN Connection? Because if you want to share your Internet Connection I sugest to you to see in the DotRas SDK Documentation, the CreateBroadbandEntry or CreateDialupEntry methods.

I think that the sharing of VPN Connection isn't correct in application because in the concept, a VPN Connection starts a secured channel between your PC (just your) and a VPN Server Machine. Therefore the sharing of the VPN Connection, you cannot garantee a trusted and secured channel with this concept. But in softwares development, all is possible!

Hope this help you.

Best regards,


Apr 8, 2011 at 7:59 PM

Hello Eduardo,


Thank you for your reply !

I want to share my Internet Connection. I will try your solutions Monday.


Thx !


Apr 8, 2011 at 10:44 PM

The easiest way to figure out which settings to configure on the phone book entry is to create a connection in Windows and then open it in code and take a look at which properties were set, and set those in your code. Just because you think a property might mean one thing, that doesn't mean it's going to do what you think. Those properties you used were for sharing phone numbers in multi-link dial-up connections.

As far as I can tell the Internet Connection Sharing (ICS) API isn't connected to the RAS API, which means it's out of scope for the project.

Here's a link to the ICS API at MSDN:

Apr 11, 2011 at 1:27 PM

Thank you very much !


I used the INetSharingConfiguration Interface in the ICS API, and i found the properties that i missed.