This project is read-only.

I cant Get That Proprieties

Mar 17, 2010 at 10:19 PM

RasEntry entry;
            entry = RasEntry.CreateVpnEntry("NAME", "IPADDRESS", rasstrat, RasDevice.GetDeviceByName("(L2TP)", RasDeviceType.Vpn));
            PhoneBook.Entries.Add(entry);

I cant Get That Proprieties

 

entry.UpdateCredentials(RasPreSharedKey.Client, "KEY");
       entry.ExtendedOptions = RasEntryExtendedOptions.UsePreSharedKey;

Mar 17, 2010 at 10:24 PM

I'm not really sure what you're asking, but did you remember to call Open on the phone book before attempting to insert it?

Also, as usual... you're going to overwrite the existing flags that have been set on ExtendedOptions if you don't use the flags correctly. I doubt you're intending to, no one seems to be able to use flags in C# either.

Mar 17, 2010 at 10:44 PM
Edited Mar 17, 2010 at 11:12 PM

sir ,First Thank u For fast Reply.

I have compile error because that Properties not found in Dotras.

entry.UpdateCredentials(RasPreSharedKey.Client, "KEY");
       entry.ExtendedOptions = RasEntryExtendedOptions.UsePreSharedKey;

Mar 17, 2010 at 11:14 PM

You must be using the wrong version of the assembly. Windows doesn't support preshared keys until Windows XP which means you need to use the WINXP copy of the dll. You've probably referenced WIN2K by accident.

Mar 17, 2010 at 11:32 PM

Thank u sir,and How I get The Correct Reference  From Here .

for preshared keys

entry.UpdateCredentials(RasPreSharedKey.Client, "KEY");
       entry.ExtendedOptions = RasEntryExtendedOptions.UsePreSharedKey;

 

Mar 17, 2010 at 11:52 PM

I told you, you need to use the WINXP build or later of the software. If you don't have the WINXP copy of the DotRas.dll, re-download the SDK. It's in the Bin folder where you installed it.