I am attempting to redirect to a different login url in ASP.NET MVC6
My account controller login method has a Route
attribute to change the url.
You'll need to configure this in startup.cs when adding the authentication service especially if you're using cookie authentication scheme.
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddCookie(options =>
{
options.LoginPath = new PathString("/login");
});
This was how i solved the issue, you'll should try it out...It'll definitely work for you