ASP Logout
-
Hi When clicking the log out button on my ASP web application, the following is executed Session.Abandon but when i click the back button on the ie browser, i'm being redirected to the previous page though the session has expired. I've tried using the no cache code
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"This has worked as after logout when I clicked on the ie browser back button i'm being redirected to the login page But when the session hasn't expired and the user is using the application and at some point when he clicks the ie browser back button, he is getting the ie error message "Page cannot be displayed". I think this being caused by the no cache code Is there any way to avoid this? Cheers
-
Hi When clicking the log out button on my ASP web application, the following is executed Session.Abandon but when i click the back button on the ie browser, i'm being redirected to the previous page though the session has expired. I've tried using the no cache code
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"This has worked as after logout when I clicked on the ie browser back button i'm being redirected to the login page But when the session hasn't expired and the user is using the application and at some point when he clicks the ie browser back button, he is getting the ie error message "Page cannot be displayed". I think this being caused by the no cache code Is there any way to avoid this? Cheers
I think this is because of the expiry that you have set for the response. Could you please try remove the expiration and only use,
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Buffer = True;This is not a tested code. If you try this way then it should work. I assume that you have proper session validation logic in your pages.
Arun Jacob My Technical Blog : Code.NET
-
I think this is because of the expiry that you have set for the response. Could you please try remove the expiration and only use,
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Buffer = True;This is not a tested code. If you try this way then it should work. I assume that you have proper session validation logic in your pages.
Arun Jacob My Technical Blog : Code.NET
-
thanks for the reply but the code you've mentioned is for ASP.Net not ASP. I need for ASP
modified on Tuesday, September 20, 2011 6:43 AM
-