Open Closed

Microservice Template with 4.3 is throwing errors #1221


0
viswajwalith created
  • ABP Framework version: v3
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): MicroService
  • Exception message and stack trace:
  • Steps to reproduce the issue: Just create a App with Microservice template using ABP Suite

When I create a sample Application with Microservice template using ABP Suite , The solution is not compailing. The root cause is depended projects are not part of initial solution file. We dont have the .csproject files for AdministrationService and other dependent projects to add those. The one way is to add depended projects & test projects manually to the solution folder structure and give a try but that is a un necessary task on Template. Please advise..

Also I dont think this is a support ticket as it ws a bug in the 4.3 version. So please exclude this ticket from the count.

If possible please provide a syntax to create a MicroService Template using CLI so that we cangive a try.


7 Answer(s)
  • 0
    gterdem created
    Support Team

    Because services have their own solutions and they are not built yet.

    Either try dotnet build /graphBuild under solution to build other solutions or navigate to each service folder where .sln is located and dotnet build in that folder.

  • 0
    viswajwalith created

    It worked thanks, but had to do that multiple times one after other :)

  • 0
    viswajwalith created

    It worked thanks, but had to do that multiple times one after other :)

    I think there still some issues with micro service template, We have added the new service using "abp new OrderService -t microservice-service-pro -d mongodb. Message showed saying the Service is created with MongoDB but It got created with EF core only. After that we followed all steps in https://docs.abp.io/en/commercial/latest/startup-templates/microservice/add-microservice, In fact I am able to make changes to use MongoDB manually and initial setup is good. But Facing some issues with Permissions. I am able to see the permissions in UI and those are selected still when trying to access my newly created service getting permission issue

    { "code": "Volo.Authorization:010001", "message": "Authorization failed! Given policy has not granted.", "details": null, "data": {}, "validationErrors": null }

    I cross verified the permission related data in Identity DB and looks good. Also If I comment Authroize attribute in my service. able to do CRUD operations.

    Can you please help us.

  • 0
    gterdem created
    Support Team

    Microservice template and module templates are different from each other. Selecting db for microservice template as abp new OrderService -t microservice-service-pro -d mongodb is not supported yet.

    I am able to see the permissions in UI and those are selected still when trying to access my newly created service getting permission issue

    What do you mean by access my newly created service? Are you trying to make a request to your newly created microservice from an other microservice? Can you compare it to sample ProductService microservice?

  • 0
    viswajwalith created

    Microservice template and module templates are different from each other. Selecting db for microservice template as abp new OrderService -t microservice-service-pro -d mongodb is not supported yet.

    I am able to see the permissions in UI and those are selected still when trying to access my newly created service getting permission issue

    What do you mean by access my newly created service? Are you trying to make a request to your newly created microservice from an other microservice? Can you compare it to sample ProductService microservice?

    I Already followed the product service and steps and all working fine with the custom service with EF (PermissionUI, CRUD permissions etc) I created one more service and added Mongo specific files/layer manually and used in newly created service. Injected the same in solution in all layers. All UI pages/Permissions are coming perfectly. but when I am making CRUD calls to the service getting the permission issue. If still not clear I may send a screen recording /screenshots of all pages to the email which you mention.

  • 0
    gterdem created
    Support Team

    And you gave the related permissions to the admin user but still getting permission erros? To be sure, this is your newly added microservice with Mongodb right? Please do send a screen record to diagnose better.

  • 0
    viswajwalith created

    And you gave the related permissions to the admin user but still getting permission erros? To be sure, this is your newly added microservice with Mongodb right? Please do send a screen record to diagnose better.

    Hi, The issue got fixed. I made a mistake. In my Service, I have replaced the EF core injection with MongoDB one. In fact I should had MongoDB injection without removng the EF core injection. After having both it work fine for me. Thanks.