locked
How to access server on local network in the UWP/Android debugger? RRS feed

  • Question

  • User300837 posted

    Hi I am developing an Android/UWP app with Xamarin Forms and Visual Studio 2019. The app will be used to access web api services always within our local network, so the endpoint will be using the server name or IP address like 10.1.1.5. I have no trouble pinging or accessing the server from my dev machine, but I can't connect to the server using either the VS UWP local machine debugger, or the Android emulator. I've tried pinging, I've also tried James Montemagno's Connectivity plugin but no luck. I have switched off the firewall on my machine - how can I access the server in a debug session?

    Tuesday, May 28, 2019 11:17 AM

All replies

  • User382871 posted
    • Here is the tutorial about connecting to local Web Service from Emulators: https://docs.microsoft.com/en-us/xamarin/cross-platform/deploy-test/connect-to-local-web-services

    • You can use a software to connect Emulator & Simulator to localhost API. Refer to: https://stackoverflow.com/a/52626534/11083277

    Tuesday, May 28, 2019 1:20 PM
  • User300837 posted

    thanks - but really I want to access some rest services that are running on our server, not on my local machine

    Tuesday, May 28, 2019 2:40 PM
  • User382871 posted

    Connect the server in the "parent network", then open your local network to internet and use your public IP.

    Similar issue: https://forums.xamarin.com/discussion/comment/233340/#Comment_233340

    Wednesday, May 29, 2019 2:01 PM