Prevent access back .Urgent !!

G

Guest

Does anyone know to .

Prevent current user to access page previous page by pressing back button after the user had logging off his/her account
If the user press the back button, the web should show the login page as to request the user to log in again and gain the private access.

Your help will be appreciated and thanx in advance

Khor.
 
H

Hermit Dave

disable all content caching on client side... so back button would mean
server side execution to serve the page (instead of it being fetched from
the temp internet files on clients pc). If you are using
HttpContext.Current.User.IsInRole or say just checking some other var...
then you know that session's done with and take him to login.aspx
if you are using forms authentication... application_authenticaterequest can
be used to authenticate every request. if you have location element in web
config setting roles required... then its a very easy way to get started...

hope this helps
 
N

nfedin

You can follow Dave's suggestions below. But the way I understand the
web, it is stateless. So when ASP.Net maintains state, it basically
submits the "state" of the page on each page submission. There for,
all the state information is maintained in the browser history. It
doesn't matter what is in the temp internet cache. The only way I can
think of would be to somehow have the session time out or maintain a
session variable that tells the server where in the program the user
should be, and if they are not force them to where they should be, but
I can't think of any way now.

Good luck,

Neil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top