locked
Windows Store App, VPN, RAS Api

    Question

  • Hello,

    We are going to release application for windows store, so far we have working prototype for windows7 and windows8 (desktop).

    Application - Description:
    Protects your online privacy by warning about using the Internet in potentially unsafe locations,
    such as unprotected WiFi hotspots in hotels, and provides a safe and trustworthy connection with a VPN service subscription, or using your own VPN settings.
    With an active service subscription, you can create an encrypted and secure channel between your computer and the target website using Virtual Private Network (VPN) technology.
    The application can even start the protected VPN connection automatically as soon as it detects that an unsafe WiFi network is being used.
    Advanced users can start and stop VPN connections manually. VPN Shield works as a subscription service with a wide range of payment options available,
    from just a few days to a whole year. You can also configure the application to use your own existing VPN connection.

    Current application already implemented for Apple Store, for details see link below:
    https://itunes.apple.com/us/app/vpn-shield/id506294747?mt=12

    Our application allows user to manage (create or dial) VPN profiles.

    For this functionality we use
    RAS Api (create and dial VPN profile)
    http://msdn.microsoft.com/en-us/library/windows/desktop/aa446741(v=vs.85).aspx

    Wlan Api (listen to wifi networks) - will be changed to classes with Windows.Networking.Connectivity in windows8
    http://msdn.microsoft.com/en-us/library/windows/desktop/ms706275(v=vs.85).aspx

    We face following troubles for Windows Store application:

    1. RAS API functions don't work properly under windows store application template (as example RasEnumDevices return error code 5 - Access Denied).
    However it works good from desktop application launched on windows 8.
    Question: how we could get RAS API to work under window store applications? If that is absolutely impossible - is there any other way to create VPN connection in app developed for Windows Store?

    2. All user's VPN profiles stored by Windows OS in "..\Microsoft\Network\Connections\Pbk\rasphone.pbk", file could be found on file system manually, but we don't have access to this file via API, either we can't access it directrly. Current workarround uses own created PBK file located in users profile folder.
    Question: how we could get access to system VPN connections stored in OS.

    Thanks,
    Ihor
    Monday, October 15, 2012 3:01 PM

Answers

  • You would need to write this app as a desktop app, not a Windows Store app. As you point out, the RAS API are available to desktop apps only.

    Windows Store apps are self contained and isolated for security reasons. They cannot affect the system as a whole, which appears to be the point of your application.

    --Rob

    Wednesday, October 17, 2012 4:55 AM
    Moderator

All replies

  • You would need to write this app as a desktop app, not a Windows Store app. As you point out, the RAS API are available to desktop apps only.

    Windows Store apps are self contained and isolated for security reasons. They cannot affect the system as a whole, which appears to be the point of your application.

    --Rob

    Wednesday, October 17, 2012 4:55 AM
    Moderator
  • Thanks for reply,

    Is there any other way to establish VPN connection in app developed for Windows Store?

    Wednesday, October 17, 2012 8:21 AM
  • You establish the VPN connection with the Ras API, which is only available to desktop apps.

    You can list your desktop app in the Store, you just cannot write this as a Windows Store app.

    --Rob

    Wednesday, October 17, 2012 11:17 PM
    Moderator
  • Thanks for your reply, it helped me a lot.

    Thanks,
    Ihor

    Thursday, October 25, 2012 2:23 PM