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
Post a Comment