Reputation: 139
I have created a ASP.NET Core Razor Pages application. I am trying to change the default page in which it opens on to be the Login page (identity login) instead of the index, and then once logged in it will open at the home/index page.
Most articles I've looked at have either not been Razor Pages or have a startup.cs class, which mine doesn't have--I have the new minimal program.cs.
I tried looking in properties for anything that was similar but couldn't find anything.
Upvotes: 0
Views: 832
Reputation: 139
All I done was add [Authorise]
at the top of my Index pageModel and then it automatically opened up to the login page.
I took this answer from the following question but I made no changes to my program.cs:
Changing home page in ASP.Net Core 2.1 with Razor pages
Upvotes: 1