Click here to Skip to main content
15,917,645 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,i am working on a project in asp.net. What i want is login logout logic, i am not using login controls and i dont wana use them in this project for now, My query is that whenever a user logs in he views his stuff and when he Sign Outs and clicks on back button of the BROWSER he must be redirected to some other page say for example Home.aspx page.
Please help me out....
Thanks & Regards
Radix
Posted

1 solution

Do you mean you don't just dont want to use the inbuilt 'asp.net login control'?

If so, you still need some sort of way of taking some credentials from the user and validating them so the user is logged in & issuing them a token. Otherwise, how will you tell if the user is logged in or not?

You can create your own login control logic - I suggest you still use the Membership provider for this but you can override & do what you like here.

http://msdn.microsoft.com/en-us/library/yh26yfzy.aspx[^]

Most websites that require you to sign in have a 'log out' link that will invalidate their token and redirect them back to some resource that doesn't require authentication (e.g. your 'Home' page). I also suggest you go this way rather than trying to mess with the 'back' button.

Correctly issuing an authentication token + use of page cache directives won't allow the user to click on the 'back' button to view any pages that require authentication.
 
Share this answer
 
Comments
Sandeep Mewara 16-Apr-11 14:41pm    
My 5!

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