Starts in:
0 DAY
10 HRS
24 MIN
49 SEC
Starts in:
0 D
10 H
24 M
49 S
Open Closed

Not able to change the default landing Home page. #6361


User avatar
0
hashmi1979 created

Hi Team, I am new to ABP, I am not able to change the default landing page of MVC application. when I run the application its showing Home Page with ABP Documentation, I want the default page to be the Login page. I looked everywhere and could not find the place where the default is configured.


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You can update the IndexModel class:

    public class IndexModel : ....
    {
        public IActionResult OnGet()
        {
            if(!CurrentUser.IsAuthenticated)
            {
                return RedirectToPage("/Account/Login");
            }
            
            return Page();
        }
    }
    
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06