I’ve created an Ionic 2 app and built it for Windows 10, and then installed the appx onto my Surface 3 tablet. This app is intended to access local network HTTP servers via IP address (specifically a couple of Raspberry Pi devices).
What I’ve discovered is that Windows Firewall absolutely refuses to let my app make any outbound connections. First I tried properly adding my app in the allowed list. No luck. Second, I tried disabling all firewall profiles. Still nothing. Lastly I went into the Windows services panel and totally shut off the Firewall service, and finally the app worked.
However, I’ve read that turning the firewall service off completely is a bad idea; it certainly is annoying because no apps will install while it’s turned off.
I’m completely at a loss as to what I need to do to get my app to work with the firewall. Does anyone have any ideas? Perhaps there’s something in the Windows app configuration files I need to set?
I’d take a read of https://cordova.apache.org/docs/en/latest/guide/appdev/whitelist/#windows-phone-whitelisting
I’ve been caught by a lack of whitelist settings before.
Windows Dev is something I’m only just starting on, however remote debugging is extremely useful for sorting these issues out. Both browser -> device and IDE -> device.
<access origin="*" /> in my
config.xml, is there something else I need to do?
Finally figured out my problem. Had to add the private networks capability to my app manifest.
Is there a way to do this without changing the private network default? I want to create a Windows Store Line of Business app that connects to our internal API. However, the Windows Store automated validation check does not allow apps that have the private network capability parameter in the appx manifest set to true.
I was able to get the solution to my problem. The solution was to put the Ionic app in to “Local” mode, ensure that the config.xml did not specify any allow-navigation to a url and to enable privateNetworkClientServer as was outlined in this thread that I found: