I am using a the basic login on a test ASP.Net MVC 5 site (for an internet site).
The login works fine but when I try to logout it doesn\'t happen. The logout link
Better way :
public ActionResult Logout()
{
SignInManager.AuthenticationManager.SignOut();
return RedirectToAction("Index", "support", new { area = "" });
}
or you can use injected SignInManager into your controller like this :
public ActionResult Logout()
{
_signInManager.AuthenticationManager.SignOut();
return RedirectToAction("Index", "support", new { area = "" });
}
there is no deference.