I am trying to specify sstp connection in DotRas - I have found a sample how to do it -
RasDevice device = RasDevice.GetDeviceByName("(SSTP)", RasDeviceType.Vpn, false);
if (device == null) throw new Exception("Cannot get RasDevice");
RasEntry entry = RasEntry.CreateVpnEntry(connectionName, serverAddress, RasVpnStrategy.SstpOnly, device);
But in my RasVpnStrategy
there are only Default
, L2tpFirst
, L2tpOnly
, PptpFirst
, PptpOnly
fields availble.
I have found that :
/// <summary>
/// Defines the VPN strategies.
/// </summary>
public enum RasVpnStrategy
{
/// <summary>
/// Dials PPTP first. If PPTP fails, L2TP is attempted.
/// </summary>
Default = 0,
/// <summary>
/// Dial PPTP only.
/// </summary>
PptpOnly = 1,
/// <summary>
/// Always dial PPTP first.
/// </summary>
PptpFirst = 2,
/// <summary>
/// Dial L2TP only.
/// </summary>
L2tpOnly = 3,
/// <summary>
/// Always dial L2TP first.
/// </summary>
L2tpFirst = 4,
#if (WIN2K8)
/// <summary>
/// Dial SSTP only.
/// </summary>
SstpOnly = 5,
/// <summary>
/// Always dial SSTP first.
/// </summary>
SstpFirst = 6
#endif
}
So, I could not even specify Sstp in my app? (Win7)
It is not possible in current DOTRas release - only PPTP/L2TP available.