Forum Xamarin.Forms

I cant connect to a localhost API project running with Xamarin project running.

I have two project running, an API project and my Xamarin project. I am trying to hit the API localhost project with my Xamarin project and it seems to never return anything at this part:

uri = "https://localhost:4455/api/Messaging/SendToken?token=test-token"

HttpResponseMessage response = await HttpInvoker(async () => await httpClient.GetAsync(uri));

Tested with UWP and Android

This url works when i enter it in a web browser, but just doesnt respond in my local Xamarin projects. Does Xamarin not support hitting other local projects?



  • Liêm_NguyễnLiêm_Nguyễn USMember ✭✭✭✭
    edited January 2019

    localhost it mean running device not your server. Run on Android localhost is Android.
    You must deploy your API to IIS or VPS
    This is my videos about build server side and deploy on ISS and client side. I hope this help

Sign In or Register to comment.