Starts in:
2 DAYS
0 HR
15 MIN
18 SEC
Starts in:
2 D
0 H
15 M
18 S
Open Closed

Authorization issue #1108


User avatar
0
Neozzz created

Hi, I followed the https://docs.abp.io/en/abp/latest/Authorization example as well as the product-service microservice example inside the microservice solution and created a new microservice. However I am not able to see it listed in the permissions screen to grant permission for the user. Could you please let me know how I could share the code with you so that I could see where I might've went wrong?

Thank you

  • ABP Framework version: v4.2.2
  • 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:

6 Answer(s)
  • User Avatar
    0
    alper created
    Support Team Director

    I think you need to reference your Application.Contracts project to your Host or Web project. Because PermissionDefinitionProvider.cs is in the Contracts project.

  • User Avatar
    0
    Neozzz created

    Hi Alper,

    I took a look at the product-service example. And that hasn't referenced application.contracts and it still shows under the permissions page.

  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    Your back-office application must reference to:

    • MyMicroservice.Web (Referencing to MyMicroservice.HttpApi <- Application.Contracts)
    • MyMicroservice.HttpApi.Client (Referencing to Application.Contracts)

    You may have forgotton to add DependsOn in your application module like: Depends_On( typeof(MyMicroserviceWebModule), typeof(MyMicroserviceHttpApiClientModule), ... )

  • User Avatar
    1
    viswajwalith created

    @Neozzz, we do faced similar issues and it got fixed afted adding the our module dependecny in src/<<FULLPROJECTNAME>>.AdministrationService/<<APPLICATIONNAME>>AdministrationServiceModule.cs

    Ex- src/Acme.BookStore.AdministrationService/BookStoreAdministrationServiceModule.cs

    Try it out it might be helpful for you.

  • User Avatar
    0
    Neozzz created

    Hi, Thanks! That fixed the issue. We added reference to administrationservice and inside the administrationservicemoduleas you said. But even though it showed the service entity under permissions for a brief moment, it is giving "500 Internal Server error" when I try to login after logging off to the web app at 44321 port number.

    This is the url: https://localhost:44322/Account/Error?errorId=CfDJ8B_truncated

    But at the web page at this address it shows as the user is logged in though.

    Any guess why this might be happening?

    Thank you :)

  • User Avatar
    0
    viswajwalith created

    @Neozzz, You are welcome. no idea on the additional issue you are facing. Try by chearing the cache or in incognito mode for verification.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06