Open Closed

Dynamic api problem in microservice project #4467


User avatar
0
mc86 created

If you're creating a bug/problem report, please include followings:

ABP Framework version: v7.0

  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi I used Dynamic api in my microservice project before v7.0
by follow the doc and it worked fine, https://docs.abp.io/en/commercial/latest/startup-templates/microservice/add-microservice#updating-gateways which is outdated

but now I got errors

Unhandled exception rendering component: Could not found remote action for method: System.Threading.Tasks.Task`1[Volo.Abp.Application.Dtos.PagedResultDto`1[CP.OaService.SuperDocTypes.SuperDocTypeDto]] GetListAsync(CP.OaService.SuperDocTypes.GetSuperDocTypesInput) on the URL: https://localhost:44325
[blazor_9a492ff9-f]: Volo.Abp.AbpException: Could not found remote action for method: System.Threading.Tasks.Task`1[Volo.Abp.Application.Dtos.PagedResultDto`1[CP.OaService.SuperDocTypes.SuperDocTypeDto]] GetListAsync(CP.OaService.SuperDocTypes.GetSuperDocTypesInput) on the URL: https://localhost:44325
[blazor_9a492ff9-f]: at Volo.Abp.Http.Client.DynamicProxying.ApiDescriptionFinder.FindActionAsync(HttpClient client, String baseUrl, Type serviceType, MethodInfo method)
[blazor_9a492ff9-f]: at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.GetActionApiDescriptionModel(IAbpMethodInvocation invocation)
[blazor_9a492ff9-f]: at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.InterceptAsync(IAbpMethodInvocation invocation)
[blazor_9a492ff9-f]: at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
[blazor_9a492ff9-f]: at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
[blazor_9a492ff9-f]: at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
[blazor_9a492ff9-f]: at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
[blazor_9a492ff9-f]: at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
[blazor_9a492ff9-f]: at CP.OaService.Blazor.Pages.OaService.SuperDoc.SuperDocTypes.GetSuperDocTypesAsync() in D:\CP\services\oa\src\CP.OaService.Blazor\Pages\OaService\SuperDoc\SuperDocTypes.razor.cs:line 94
[blazor_9a492ff9-f]: at CP.OaService.Blazor.Pages.OaService.SuperDoc.SuperDocTypes.OnDataGridReadAsync(DataGridReadDataEventArgs`1 e) in D:\CP\services\oa\src\CP.OaService.Blazor\Pages\OaService\SuperDoc\SuperDocTypes.razor.cs:line 113

in this post,it says that ms project don't support dynamic proxies. https://support.abp.io/QA/Questions/3920/Commercial-Micro-Service-Project---Error-when-using-dynamicaly-proxied-clients-over-gateways#answer-3c521983-6726-7c4c-4cc2-3a071af7cf96

so i'd like to know ,do or do not the ms support dynamic proxies? if it supports , how to fix my problem?


3 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    The dynamic API proxy needs to get API definitions from the gateway.

    You can try access to https://localhost:44325/api/abp/api-definition to check it.

    You may need to add the Http.Api project reference to the gateway project and add Module class dependencies.

    Some info may help:https://support.abp.io/QA/Questions/3920/Commercial-Micro-Service-Project---Error-when-using-dynamicaly-proxied-clients-over-gateways#answer-a13bcfe6-0bbe-9aa4-e5de-3a0717381d5b

  • User Avatar
    0
    mc86 created

    Thank u liangshiwei

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    I'm closing the question, free open it if still a problem.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11