UWP VPN Plugin Issue: RasDialA Error (ERROR_PORT_NOT_AVAILABLE)
Yiftach Karkason
0
Reputation points
Overview:
- We have developed a UWP VPN Plugin, based on the samples
- We connect to the VPN from a Win32 application using the RasDialA/RasHangUpA APIs (not using the
VpnManagementAgent
WinRT API because it isn't fully functional from non-packaged applications). - It worked great in testing but now we see sporadic
ERROR_PORT_NOT_AVAILABLE
errors from theRasDialA
when deployed to clients
Environment:
- Windows 11 Version 10.0.22621.3007
- Win32 application must run as user without admin privileges
Details:
- This error starts appearing for some users (but not all), and we couldn't identify the cause
- A reboot sometimes solves this issue
- We managed to resolved it by going to
Device Manager
, uninstalling the WAN Miniport (SSTP) network adapter and reinstalling it (by scanning for hardware changes), or using thepnputil /remove-device "SWD\MSRRAS\MS_SSTPMINIPORT"
&pnputil /scan-devices
command lines, but these actions require administrator privileges which our application lacks.
Debugging attempts:
- Checked event logs but did not see anything useful beyond the error itself
- When we try to configure protocols other than
SSTP
in the advanced VPN settings we experience different errors that seem related to native VPN profiles (DNS resolution failure, Authentication errors, etc...).SSTP
is the only mode that successfully runs our VPN Plugin. -
netsh ras set tracing * enabled
did not produce helpful traces in%windir%\tracing
Questions:
- What could be the causes of this inconsistent error?
- Could you recommend any troubleshooting further steps?
- Are there known fixes or workaround that do not require admin privileges?
Please let me know if any further technical details would help in diagnosing this. I can provide traces, phonebook configurations, etc.
Thank you for any guidance you can provide!