Base solution for your next web application
Open Closed

Problem calling a custom abp service ending in the letter 'Async' - 'xxxxAsync is not a function' #10653


User avatar
0
kevinjhackett created

Product Version: ASPNET ZERO 10.2 Product Type: ASP.NET Core and jQuery Framework: .NET 5.0 ABP Version: default 6.2 - no upgrades

I have several successful calls from my client javascript to my service methods (eg. abp.services.app.myservice.someMethod() ). Recently I tried calling another method (eg. AddFavoriteAsync() ) but I get a console error 'abp.services.app.myservice.addFavoriteAsync is not a method'. If I remove the Async, or replace it with anything else, the call works fine.

Is there some undocumented limitation of naming a method xxxxxAsync() ?


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

    Hi @kevinjhackett

    This is ASP.NET Core's convention. The Async postfix will be always removed from the method names.