- 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.<InterceptAsync>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.<ProceedAsync>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)
-
0
hi
Can you share a simple project?
liming.ma@volosoft.com
-
0
hi
Can you share a simple project?
liming.ma@volosoft.com
Thanks, I have sent you one.
-
0
ok, I will check it asap.
-
0
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>(); }); } }
-
0
Thanks! Working perfectly! :-)