For our MVC Application we use Thinktecture Identity Server for our claims. Everything works expected but some time randomly when we logout the logout is not happening and still the session is there.
When we click logout, it take to the home page(as expected) But after we click login (it suppose to redirect to logging page where we give user credentials) but it goes to the logged in user page. It looks like the logout hasn't happen properly. But this is not consistent it happens randomly in rare case.
Any input will be highly appreciated.
Our logout code is
public ActionResult Logout()
{
var fam = FederatedAuthentication.WSFederationAuthenticationModule;
FederatedAuthentication.SessionAuthenticationModule.DeleteSessionTokenCookie();
fam.SignOut(false);
var signOutRequestMessage = new SignOutRequestMessage(new Uri(fam.Issuer), fam.Realm);
ViewBag.SignOutUrl = signOutRequestMessage.WriteQueryString();
return View();
}