Base solution for your next web application
Open Closed

Using ABP as restful API #2117


User avatar
0
birthdaycensus created

I need to consume the services exposed by my ASP.NET Zero project from a mobile client but this is not working. I have a CategroyAppService that has a GetCategory method. I am able to call this method from the JavaScript proxy (abp.services.app.category.getCategory) on the web client, but I am receiving 'Empty or Invalid anti forgery header token.' whenever I try to access /api/services/app/category/getcategory?id=1 How do I resolve this, Please


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Is your project ASP.NET MVC 5.x or ASP.NET Core ?

  • User Avatar
    0
    birthdaycensus created

    Its ASP.NET 5.x

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Can you try to access the same api via postman ? It's explained here <a class="postlink" href="https://aspnetzero.com/Documents/Development-Guide#token-based-authentication">https://aspnetzero.com/Documents/Develo ... entication</a>.

    If you can reproduce the problem, please share postman's request with us and I will try the same thing in order to understand your case.

    Thanks.