I have a Login page with a "Forgot Password" link, which is created using an <a>
tag with an href
attribute of @Url.Action("ForgotPassword", "Login", new { Area = "Admin" })
, and for some reason this link directs me to the login page instead of the ForgotPassword page.
Does anybody have a clue as to why this is? I have been investigating and found nothing strange in my project.
Another note: the "Index" action on my Login controller gets hit, but the "ForgotPassword" action never does.
Here's the ForgotPassword action:
[HttpGet]
public ActionResult ForgotPassword()
{
return View();
}
It turns out my issue was being caused by my
BaseController.cs
which all of my other controllers inherit from. It was redirecting to the login because of faulty validation logic, which I fixed.Thank you all for the sensible suggestions.