Open Closed

Best Practise to allow anonymous Users to call service functions #479


User avatar
0
ab created
  • ABP Framework version: v3.2
  • UI type: MVC
  • Tiered (MVC) or Identity Server Seperated (Angular): no

Hello, I am currently creating a project for a public website. Thereby I call methods from the "AppServices". This methods come with the default Authroize attribues this is why the user gets a "access denied" For the generation of the entities I use the "abp suite", which then overwrites the services.

What is the best practise to allow anonymous users to display information? Should I rewrite/ overwrite the service methods like "GetWithNavigationPropertiesAsync" or is there a better idea? Is it possible to grant the anonymous user a default permission level?

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

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

    the only way is removing the [Authorize] attribute from Application Services. If you want to guard some specific Web API actions, you can also put the [Authorize] attribute to your service methods .

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ab created

    Hi Alper, Thank you for your reply.

    I really like your abp suite for adding but also modifing existing entities. When modifing the entity the service will get overwritten. Do you have any practical hint how I can modify authorization without deleting the attribute?

    Thank you

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    alper created
    Support Team Director

    actually there's no practical way of this :(

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.