I am beginner in ASP .NET Core 2.1 and working on project which is using ASP .NET Core 2.1 with individual authentication. I want to make my login page as my default route instead of Home/Index:
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
Any help how can i change it as ASP .NET Core 2.1 as Login is now used as a razor page instead of MVC Action View.
Use this in ConfigureServices method.
services.AddMvc().AddRazorPagesOptions(options=> {
options.Conventions.AddAreaPageRoute("Identity", "/Account/Login","");
}).SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
then in Configure method
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});