I'm trying to create a new VPN profile in a universal windows app. I am using this api.
There are two documented ways to do that. AddProfileFromXmlAsync and AddProfileFromObjectAsync. Unfortunately for me none of them work correctly.
When I'm using AddProfileFromXmlAsync I get all the time error AccessDenied. I saw on this thread that somehow it could be related to bad xml syntax but I get the same error also when I am using the exact xml in the Microsoft example.
AddProfileFromObjectAsync works fine if you provide only the ProfileName. Otherwise it fails with error Other. This is not enough for me because I need also the configure the NativeProtocolType property. Before I am trying to add the new profile I am checking to see if the profile already exists so for sure I am not getting error Other because the profile already exists.
I am adding these capabilities to my app manifest:
<Capabilities>
<Capability Name="internetClient" />
<Capability Name="internetClientServer" />
<Capability Name="privateNetworkClientServer" />
<rescap:Capability Name="networkingVpnProvider" />
</Capabilities>
Does anyone have any idea what could be the problem?
