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?
posted by:
Grant
Florida
  • There 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

Recent topics in "ASP.net web development"

Topic Author Replies Last Post
graphics in asp Toby 0 August 9, 2008
Does anybody know? Grant 2 January 2, 2008
How to create asp.net pages dynamically? Grant 1 January 2, 2008
question about isPostBack Eira 3 November 2, 2007