Web application logout process does not clear Session properly
Situations :
Session to maintain the login and logout process. Everything is running perfect and smooth. The thing i want to know and clear is that, i want to clear system cache or web cache on log out. Actually some of the Session enabled pages opens once after logging out on the systems that are on LAN and using as Linux SQUID server on the backend. The copy of the page is stored in the cache, and opens the page without asking to log in if opened directly from the address bar. Once refreshed, the page then moves to Login page. Is there anyway to solve this?
After I logout and kill session in my web application, In internet explorer 6.0 user copy url and paste url and show web site like he login. I think because of internet explorer buffer in firebox 3.0 it don’t be how can we solve it on internet explore 6 ? How can we cancel internet explorer buffer cache?
Problem:
Midway through the project, I noticed that this Session information was not clearing itself when a user logged out of the system. I confirmed by logging in as "User 1", setting the Session value via a search, logging out, and subsequently logggin in as "User 2." User 2 was able to view the search criteria
entered by User 1 -- definitely NOT a desired behaviour.
Cause:
Does not clear Session when a Logout occurs. The control does perform a FormsAuthentication.Signout(), and it clears the Response with a status code of
200. But, it does not clear Session.
Solution: The fix was simple. Use below code to fix the issue
font color="#003366">
protected void logout()
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Session.Clear();
FormsAuthentication.SignOut();
DisableBufferingOnPage()
}
protected void DisableBufferingOnPage()
{
Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1); // set expiry date in the
past
Response.Expires = 0;
Response.CacheControl = "no-cache";
Response.Cache.SetNoStore();
Response.AppendHeader("Pragma", "no-cache");
}
Hi all, I have same, is any one solved the issue using above solution ?
ReplyDeleteNooooooooooooooo
ReplyDeleteWow, Fantastic Blog, it’s so helpful to me, and your blog is very good,
ReplyDeleteI’ve learned a lot from your blog here, Keep on going, my friend, I will keep an eye on it,
This posting is beautifully explained regards the topic and thanks to u for posting this information and the way it explain clearly is so nice. Hopefully it must be very necessay for people and help them......
ReplyDeleteits working fine, thanx
ReplyDeleteGreat Post... Works great
ReplyDeletewow, working very fine, thanks mate ASP.NET Hosting
ReplyDeleteNice it was really fantastic nice info asp .net development services
ReplyDeleteVery nice Thanks for sharing
ReplyDelete.Net Online Training Bangalore
Yeni perde modelleri
ReplyDeletesms onay
mobil ödeme bozdurma
Https://nftnasilalinir.com
ankara evden eve nakliyat
trafik sigortası
DEDEKTÖR
web sitesi kurma
Ask kitaplari
SMM PANEL
ReplyDeletesmm panel
iş ilanları
İnstagram takipçi satın al
hirdavatciburada.com
https://www.beyazesyateknikservisi.com.tr
servis
tiktok jeton hilesi
Good content. You write beautiful things.
ReplyDeletehacklink
taksi
korsan taksi
vbet
hacklink
mrbahis
vbet
mrbahis
sportsbet
Success Write content success. Thanks.
ReplyDeletebetmatik
kralbet
betturkey
deneme bonusu
kıbrıs bahis siteleri
canlı poker siteleri
betpark
hatay
ReplyDeletekars
mardin
samsun
urfa
AS46A6
artvin
ReplyDeletebitlis
niğde
hatay
tunceli
W7L36
https://saglamproxy.com
ReplyDeletemetin2 proxy
proxy satın al
knight online proxy
mobil proxy satın al
PWUS10