Open Closed

Call Micro Service from another Micro Service #5998


User avatar
0
DominaTang created

If a Micro Service has two controller, which implement separate AppService, For the [Area("...")], can these two controller use same value? There is a strange behavior right now, when call another MicroService method, the first time call it is fine, and second call failed complain that the remote service is not defined in RemoteService section? Any clue? "Remote service 'xxxxService' was not found and there is no default configuration.

  • ABP Framework version: V7.2.3
  • UI Type: Angular
  • Database System: EF Core / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

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

    If a Micro Service has two controller, which implement separate AppService, For the [Area("...")], can these two controller use same value

    Yes, no problem. The ABP module does the same:

    There is a strange behavior right now, when call another MicroService method, the first time call it is fine, and second call failed complain that the remote service is not defined in RemoteService section? Any clue?

    You can check the document: https://docs.abp.io/en/commercial/latest/startup-templates/microservice/synchronous-interservice-communication

    {
        "RemoteServices": {
          "Default": {
            "BaseUrl": "https://localhost:....",
            "UseCurrentAccessToken": "false"
          },
          "YourServiceName": {
            "BaseUrl": "https://localhost:......",
            "UseCurrentAccessToken": "false"
          }
        }
    }
    
  • User Avatar
    0
    DominaTang created

    Thanks. So our controller code should be fine. Need to investigate why the second call failed, the code was working without problem before.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 12, 2024, 07:15