Have looked at all the posts on here and none of them are fixing my issue.
I Hit the URL: /Users/KickOutUser
public void KickOutUser()
{
TempData["ErrorMessage"] = "You need to be logged in to access that content";
//Redirect to Login
RedirectToAction("Login");
}
/*user controller*/
public ActionResult Login()
{
//E.G ErrorMessage comes from HandleUnauthenticatedUser
ViewData["ErrorMessage"] = TempData["ErrorMessage"] ?? null;
return View();
}
With debugging, I can see it hit the first method, then redirect, but the redirect call never calls the Login method, and I end up with a blank view..