I am developing an Android mobile app with an ASP.NET CORE Webapi 5.0 back end. I can make API calls when I run the app on a web browser using ionic serve
, but when I run it on the device (ionic cordova run android --device
), I keep getting ERR_CONNECTION_TIMED_OUT
. I have enabled CORS and the API and device are running on the same Wifi network. I suspect the issue maybe that the backend is running over https
and I need to make some adjustments for that, but I don't know what that would be. I have tried to research this, but can't find anything I really understand.
I have installed cordova-plugin-whitelist
, but don't know if any further configuration is needed.
I am making the api calls using https://<my-computer-IP>:<port>/<apiendpoint>
UPDATE: I updated the URL bindings for IIS Express to use URLs with my computer's IP address. The calls work in my web browser. I also disabled SSL and the Firewall. But I am still getting the ERR_CONNECTION_TIMED_OUT
when attempting to make the same API call from my device
Thanks for everyone's patience, I'm not well-versed on network issues.
Ionic Info:
Ionic CLI : 5.4.16 (C:\Users\sarah\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 5.6.3
@angular-devkit/build-angular : 0.1102.8
@angular-devkit/schematics : 11.2.8
@angular/cli : 11.2.8
@ionic/angular-toolkit : 3.1.1
Cordova:
Cordova CLI : 10.0.0
Cordova Platforms : android 10.1.0
Cordova Plugins : cordova-plugin-ionic-webview 5.0.0, (and 7 other plugins)
Utility:
cordova-res : 0.15.3
native-run : 1.3.0
System:
Android SDK Tools : 26.1.1
NodeJS : v14.16.1 (C:\Program Files\nodejs\node.exe)
npm : 7.8.0
OS : Windows 10