I have managed to figure out which database I can use with roles, membership etc. I can login as admin and then when I click another link or go to another site and come back to the page I am still logged in ....how do you fix this?
-
Re: How to logout a user that navigates to another link or site.
Wed, May 10, 2006 - 12:32 PMThere is no sure fire way to know the user has left your page, unless they leave via a link or other action on your page. Then you can do
Session.Abandon before you do a Response.Redirect. If they navigate via the browser, then you don't know they left.
You can keep your session times very short.
You can also keep the page from caching -- though the session can still be active, it does require the server to be called again and you can decide if you'd like to force them to log in again.
This method kills the cache...
Protected Sub KillCache()
Response.Cache.SetNoStore()
Response.Cache.SetAllowResponseInBrowserHistory(False)
Response.Cache.SetCacheability(HttpCacheability.NoCache)
End Sub