Getting issue while invoking a Asp.Net Core Web API from Xamarin

Getting issue while invoking a Asp.Net Core Web API from Xamarin
0.0 0

#1

I am using the MobileServiceClient (Microsoft.Azure.Mobile.Client version 4.0.1) with the InvokeApiAsync method to do the call but always fails with a null exception. If I call an API that does not have authorization, it works fine.

So my question is if I can use the MobileServiceClient or this doesn’t want to work with .NET Core. I don’t want to call my APIs with HttpClient.


#2

As far as I know, the MobileServiceClient couldn’t add the authorization token by default to ask for
asp .net core web API.

So you will find you couldn’t get the response from the asp .net core web API.

I suggest you could create a custom HttpMessageHandler to add the token to the request and use MobileServiceClient send the request.