Open Closed

Proper way to customize the login page in a Blazor server project #8501


User avatar
0
Sergei.Gorlovetsky created
  • ABP Framework version: v7.3.3
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I am trying to customize the Login page and having trouble overriding the razor page and the model. Following some of the docs here: https://abp.io/docs/latest/framework/ui/mvc-razor-pages/customization-user-interface https://abp.io/community/articles/how-to-customize-the-login-page-of-an-abp-blazor-application-by4o9yms

So far I have met a couple issues:

  1. Only overwrite the razor page The requested service 'Volo.Abp.Account.Public.Web.Pages.Account.LoginModel' has not been registered.
  2. If I try to overwrite the LoginModel with a customized one as well, but the parameter that I need to pass into the based LoginModel causes an exception

Any suggestions? Thanks


4 Answer(s)
  • User Avatar
    -1
    Anjali_Musmade created
    Support Team Member

    Hello ,

    You can use Account Module as a package or you can include its source code into your project https://abp.io/docs/latest/modules/account#how-to-install This is link will help you.

    With this URL, you can get an idea of how to override the login page: https://gist.github.com/ebicoglu/ce0f0425bab806d0ee1a87d0073af96b

    On my side, I have implemented it; you can check it, and it should work perfectly.

    Once you can try this way and check it is work or not.

    Thank you.

  • User Avatar
    0
    Sergei.Gorlovetsky created

    I already followed pretty much your answer above and I think your sample was not up to date with the latest Abp version as the 'LoginModel' takes in 7 parameter(s) instead of 2 And that is where I met the 2nd exception in the screenshot in the original post

  • User Avatar
    0
    Sergei.Gorlovetsky created

    Also is there a reason I will get this error?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Also is there a reason I will get this error?

    You can ignore it, it is defined in the layout page

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 13, 2025, 04:08