打开 关闭

Problem with Generating Dynamic Proxies in v5.1.3 #2533


User avatar
0
viswajwalith 创建
  • ABP Framework version: v5.1.3
  • UI type: MVC
  • DB provider: EF Core / MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes / Microservice
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

We upgraded our application from 4.4.0 to 5.1.3

Product Service is generating dynamic proxies in 5.1.3, our Employee Service is not generating dynamic proxies in 5.1.3 In 4.4.0 our Employee Service was able to generate dynamic proxies successfully.


4 答案
  • User Avatar
    0
    gterdem 创建
    Senior .NET Developer

    If you want to keep using dynamic proxies, you need to make web/publicweb gateways reference to HttpApi layer of the microservice and depend on them.

    Or you can use static proxy with AddStaticHttpClientProxies and generate proxies using cli command: abp generate-proxy --type csharp --module RemoteServiceName --url https://microservicehost:port under HttpApi.Client layer while it's running.

  • User Avatar
    0
    viswajwalith 创建

    Already there are microservice HttpApi reference in web gateway like product service. if we give web gateway reference in HttpApi layer of the microservice, there will be circular dependency. Dynamic proxies generating for product service with existing references but not for our other microservices.

  • User Avatar
    0
    viswajwalith 创建

    Added references to HttpApi layer of the microservice in Web. Now it is generating Dynamic Proxies.

  • User Avatar
    0
    gterdem 创建
    Senior .NET Developer

    We'll create a guide about switching between dynamic and static proxies.

    Closing the issue. Feel free to re-open if you come across the same issue.

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