c# - How to specify SSTP usage in DotRas? -


i trying specify sstp connection in dotras - have found sample how -

rasdevice device = rasdevice.getdevicebyname("(sstp)", rasdevicetype.vpn, false);             if (device == null) throw new exception("cannot rasdevice");             rasentry entry = rasentry.createvpnentry(connectionname, serveraddress, rasvpnstrategy.sstponly, device); 

but in rasvpnstrategy there default, l2tpfirst, l2tponly, pptpfirst, pptponly fields availble.

i have found :

/// <summary>     /// defines vpn strategies.     /// </summary>     public enum rasvpnstrategy     {         /// <summary>         /// dials pptp first. if pptp fails, l2tp attempted.         /// </summary>         default = 0,          /// <summary>         /// dial pptp only.         /// </summary>         pptponly = 1,          /// <summary>         /// dial pptp first.         /// </summary>         pptpfirst = 2,          /// <summary>         /// dial l2tp only.         /// </summary>         l2tponly = 3,          /// <summary>         /// dial l2tp first.         /// </summary>         l2tpfirst = 4, #if (win2k8)         /// <summary>         /// dial sstp only.         /// </summary>         sstponly = 5,          /// <summary>         /// dial sstp first.         /// </summary>         sstpfirst = 6 #endif     } 

so, not specify sstp in app? (win7)

you need reference @ least win2k8 version of dotras.dll should have rasvpnstrategy.sstponly , rasvpnstrategy.sstpfirst enum options.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -