Hi WebGurus,
I have used the following article to create a POC on showing an Session expire warning message in a asp.net mvc2 application.
http://www.fairwaytech.com/2012/01/handling-session-timeout-gracefully/
I have made one change in the code as mentioned below:
location.href = expireSessionUrl; in the endSession method to the following code:
window.location.replace(expireSessionUrl);
and once user clicks on the Log Out button present in the Session warning message dialog box he is navigated to the LogOut view. But here if he clicks the browser back button he is navigated to the previous page.
I have the following modified Expire method as mentioned bleow:
[Authorize]
public virtual ActionResult Expire()
{
Session.Clear();
FormsService.SignOut();
HttpContext.Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1));
HttpContext.Response.Cache.SetValidUntilExpires(false);
HttpContext.Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches);
HttpContext.Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Response.Cache.SetNoStore();
return Redirect("/");
}
Can you please guide me in resolving the issue.
Thanks In Advance
Santosh Kumar Patro
santosh kumar patro