locked
HttpClient - protoent* getprotobyname(char const*)(3) is not implemented on Android RRS feed

  • Question

  • User237598 posted

    Hello,

    I'm trying to use HttpClient on Xamarin.Forms PCL and it's working for WindowsPhone.

    For Android i'm getting some erros, and even with ModernHttpClient i can't get it to work.

    I recently updated Xamarin to the last stable version i guess, and i tried to update the nuget packages Xamarin.forms and all Android ones but most the times i get problems with dependencies and i can't update them.

    Really need some help on this cause i think it's a simple problem because Xamarin.Forms has HttpClient implemented by default in newer versions, so i'm missing something.

    Thanks.

    Snippet:

    var client = new HttpClient(); var response = await client.GetAsync("http://192.168.11.226:29999/api/values/getall");****

    Wednesday, August 24, 2016 3:30 PM

Answers

  • User237598 posted

    After some struggling on this one i found the problem..

    There was no problem with the HttpClient itself, but the outputs weren't clear at all.

    The execution ended in the try catch block because the HttpClient could not reach the destination..

    On WindowsPhone, the app emulator and the Api Server are in the same network, but in visual studio emulator the Droid App has a special IP that my firewall was blocking, because it was not considered to be in the same network as the Api Server.

    So just disabling the firewall worked for me, then add the port rules after.

    The output: protoent* getprotobyname(char const*)(3) is not implemented on Android did not had any effect i guess, i was searching in the wrong places..

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, August 26, 2016 11:16 AM