0

hi i would like to know how would you lougout an user if he modifies the url or refreshes the web pages like in bank web sites in asp .net.

Thanks for your answers

2
  • 1
    do banks do that? Logging a user out when they press F5 or changes the URL? That's a weird behaviour I've never seen
    – Leo
    Dec 11, 2013 at 4:03
  • yes they do, try in your internet banking
    – Gerry
    Dec 11, 2013 at 4:48

1 Answer 1

0

I have implemented a solution similar to Vignesh Kumar's answer by using roles and restricting access to pages based on the roles a user has. When a user logs in I check which pages they can access based on their assigned roles and build the navigation menu accordingly so that they're not able to navigate to restricted pages.

In my master page's Page_Load method I check whether a user has access to the page they're trying to access and if not I log them out and redirect them to the login screen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.