I want to set Login Page as Default page.Login page is present in Area Folder
Below is the project structure
i had tried to set default route in Startup.cs page but unable to set below is the snapshot of starup.cs
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "identity/{controller=Account}/{action=Signin}");
routes.MapRoute(
name: "areaRoute",
template: "{area:exists}/{controller}/{action}"
);
});
Every time i get error 404 error not able to find where is the exact issue
Controller Code:
[Area("Identity")]
[Route("identity/[controller]")]
public class AccountController : BaseController
{
private readonly UserManager<ApplicationUser> _userManager;
private readonly SignInManager<ApplicationUser> _signInManager;
public AccountController(
UserManager<ApplicationUser> userManager,
SignInManager<ApplicationUser> signInManager
)
{
_userManager = userManager;
_signInManager = signInManager;
}
// GET: /Account/SignIn
[Route("[action]")]
[HttpGet]
[AllowAnonymous]
public async Task<IActionResult> SignIn(string returnUrl = null)
{
return View();
}
}
