Issue
I have a Cordova (Ionic >=2) UWP application that connects to a backend REST service via https. This works fine in ionic serve, and also when deployed and running on iOS and Android.
I have finally got a UWP build to install on my local desktop dev machine (Windows 10). I’ve double clicked the .appx file to install, and then app successfully installs and displays
Capabilities:
Access your Internet connection
When I run a test http command it has, it can connect to localhost, but not to a remote server using https (and a published DNS names that works everywhere else).
If I build in debug and run in VS, the error returned by the http.get just shows the following:
So just status 0 and no status description. Probably a security problem?
How can I diagnose this?
Update
I installed Fiddler, and this reports the following:
HTTP/1.1 502 Fiddler - DNS Lookup Failed
Date: Thu, 03 Aug 2017 00:58:47 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Cache-Control: no-cache, must-revalidate
Timestamp: 08:58:47.799
So is pointing to a DNS lookup problem?
Solution
The key for me here was I needed Private Networks (Client & Server)
The following did this for me...
cordova plugin add cordova-windows-capability-localnetwork
Answered By - peterc
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.