Jump to content
Sign in to follow this  
Ojusvee06

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

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing

    No registered users viewing this page.

  • Member Statistics

    • Total Members
      58,416
    • Most Online
      4,970

    Newest Member
    angelsphone09
    Joined
  • Forum Statistics

    • Total Topics
      65,740
    • Total Posts
      452,901
×