Open Closed

How to change Access denied path in MVC application #1232


User avatar
0
suraj.kumbhar created
  • ABP Framework version: v4.2
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:

When User redirects to the unauthorize page, access denied pages comes. i want to add custom page which will redirect user to that page.

e.g. I dont have permissions to Identity/Users page then i want to redirect user to different page or how can overide the existing Account/AccessDenied page?


4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    how can overide the existing Account/AccessDenied page?

    https://docs.abp.io/en/abp/latest/UI/AspNetCore/Customization-User-Interface#overriding-a-page https://community.abp.io/articles/how-to-customize-the-login-page-for-mvc-razor-page-applications-9a40f3cd https://support.abp.io/QA/Questions/240/How-to-customize-the-login-page

  • User Avatar
    0
    suraj.kumbhar created

    how can overide the existing Account/AccessDenied page?

    https://docs.abp.io/en/abp/latest/UI/AspNetCore/Customization-User-Interface#overriding-a-page https://community.abp.io/articles/how-to-customize-the-login-page-for-mvc-razor-page-applications-9a40f3cd https://support.abp.io/QA/Questions/240/How-to-customize-the-login-page

    Thanks, But i know about this. I want to change that Account/AccessDenied route to my new custom page? Unfortunately i dont know where is that page located.

  • User Avatar
    1
    maliming created
    Support Team Fullstack Developer
    
    services.ConfigureApplicationCookie(options =>
    {
        options.AccessDeniedPath = "/MyAccessDenied";
    });
    
  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 10, 2024, 06:38