The goal: I am trying to get the user to log off if they leave this area. Area name: employer if the user goes to the home page or anywhere else on the web and tries to log in or hits the back button I want the system to end the users session.

for example: - is protected and the user has to be logged in to access this area.

if the user goes to and try to go back to their session ends and they are redirected to the login page.

Some Questions:

  • Would it be a good idea to make an extend to the AuthorizeAttribute?
  • How would I log the user off?
  • How can I detect if the user leaves the area and comes back.
  • Should I make some sort of base controller that all of the other controllers inherit in the area so the area is protected?
  • Should the solution be server side?

any advice would help

Related posts

Recent Viewed