Click here to Skip to main content
15,903,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am using asp.net 3.5

i develop a web applicaton. for logout i use session.abondon() method

but when a click on back option of browser after logout i can go on admin page. i don't want to go this page after logout.

plese help me............
Posted

 
Share this answer
 
The back button will always redirect you to previously visited page, But further forward redirection from that page will be restricted once session is abandoned.

Alternatively you can use JavaScript to remove previous history so that it will not go back and it will be disabled.
 
Share this answer
 
I have similar experience on the logout and yet not really out. The issue is not on session variable that has not set correctly but on the program logic error. It is very easy to write program like:

if session("seeUserLoginOK") <> "OK" then
error messaging...
end if

.... all other codse include html display

The correct way, and have to be do it in every program, is:

if session("seeUserLoginOk") <> "OK" then
error messaging....
else

.... all other codes include html display

end if

This is a simple error experienced traditional C programmer can easily fell into. It is also impoprtant in stop unwanted access as well.

rgds,
kfl.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900