Starts in:
2 DAYS
0 HR
23 MIN
58 SEC
Starts in:
2 D
0 H
23 M
58 S
Open Closed

My service endpoints not found. #6234


User avatar
0
carl.hallqvist created
  • ABP Framework version: v7.3.3
  • UI Type: Blazor WASM
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace: N/A
  • Steps to reproduce the issue: N/A

I have followed the https://docs.abp.io/en/commercial/latest/startup-templates/microservice/add-microservice guide, and most of it works. However, once I try to use my AppServices endpoints from the Blazor project, the JavaScript console says that:

rit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Could not found remote action for method: System.Threading.Tasks.Task`1[Volo.Abp.Application.Dtos.PagedResultDto`1[GeoTicket.TicketService.Categories.CategoryDto]] GetListAsync(GeoTicket.TicketService.Categories.GetCategoryListDto) on the URL: https://localhost:44325
Volo.Abp.AbpException: Could not found remote action for method: System.Threading.Tasks.Task`1[Volo.Abp.Application.Dtos.PagedResultDto`1[GeoTicket.TicketService.Categories.CategoryDto]] GetListAsync(GeoTicket.TicketService.Categories.GetCategoryListDto) on the URL: https://localhost:44325
   at Volo.Abp.Http.Client.DynamicProxying.ApiDescriptionFinder.FindActionAsync(HttpClient client, String baseUrl, Type serviceType, MethodInfo method)
   at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.<GetActionApiDescriptionModel>d__25[[GeoTicket.TicketService.Categories.ICategoryAppService, GeoTicket.TicketService.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
   at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.<InterceptAsync>d__24[[GeoTicket.TicketService.Categories.ICategoryAppService, GeoTicket.TicketService.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.&lt;InterceptAsync&gt;d__3`1[[Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1[[GeoTicket.TicketService.Categories.ICategoryAppService, GeoTicket.TicketService.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Volo.Abp.Http.Client, Version=7.3.3.0, Culture=neutral, PublicKeyToken=null],[Volo.Abp.Application.Dtos.PagedResultDto`1[[GeoTicket.TicketService.Categories.CategoryDto, GeoTicket.TicketService.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Volo.Abp.Ddd.Application.Contracts, Version=7.3.3.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
   at Castle.DynamicProxy.AsyncInterceptorBase.<ProceedAsynchronous>d__14`1[[Volo.Abp.Application.Dtos.PagedResultDto`1[[GeoTicket.TicketService.Categories.CategoryDto, GeoTicket.TicketService.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Volo.Abp.Ddd.Application.Contracts, Version=7.3.3.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.&lt;ProceedAsync&gt;d__7[[Volo.Abp.Application.Dtos.PagedResultDto`1[[GeoTicket.TicketService.Categories.CategoryDto, GeoTicket.TicketService.Application.Contracts, Version=1.0.0.0, 

The ticket-service swagger seems to be working, also through the gateway.

So, my question in, how to consume AppServices with start from the guide Add Microservice above? When using ABP framework, it seems that it is managed dynamically?


5 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share a simple project?

    liming.ma@volosoft.com

  • User Avatar
    0
    carl.hallqvist created

    hi

    Can you share a simple project?

    liming.ma@volosoft.com

    Thanks, I have sent you one.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok, I will check it asap.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Enabling the static proxy in your service will work.

    PS GeoTicket\services\ticket\src\GeoTicket.TicketService.HttpApi.Client>   abp generate-proxy -t csharp -m ticketService -url https://localhost:44783/ --without-contracts
    ABP CLI 8.0.0-rc.1
    Create ClientProxies\GeoTicket\TicketService\Categories\CategoryClientProxy.cs
    Create ClientProxies\GeoTicket\TicketService\Categories\CategoryClientProxy.Generated.cs
    

    AddStaticHttpClientProxies

    public class TicketServiceHttpApiClientModule : AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            context.Services.AddStaticHttpClientProxies(typeof(TicketServiceApplicationContractsModule).Assembly,
                TicketServiceRemoteServiceConsts.RemoteServiceName);
    
            Configure<AbpVirtualFileSystemOptions>(options =>
            {
                options.FileSets.AddEmbedded<TicketServiceHttpApiClientModule>();
            });
        }
    }
    

  • User Avatar
    0
    carl.hallqvist created

    Thanks! Working perfectly! :-)

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06