Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. logout in asp.net

logout in asp.net

Scheduled Pinned Locked Moved ASP.NET
databasecsharpasp-nethelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nerzhul86
    wrote on last edited by
    #1

    hi im doing an asp.net website with a login system for its users. i used a table in sql to maintain a record of user details.when a user logs in , i set a flag to 1 and when they click the logout button , the flag is set back to 0. my problem is if the user closes the browser window or for some reason the system crashes , that user still remains logged in. i have 2 go to the database and set the flag. please suggest some way to solve my prob. thanx

    N 1 Reply Last reply
    0
    • N nerzhul86

      hi im doing an asp.net website with a login system for its users. i used a table in sql to maintain a record of user details.when a user logs in , i set a flag to 1 and when they click the logout button , the flag is set back to 0. my problem is if the user closes the browser window or for some reason the system crashes , that user still remains logged in. i have 2 go to the database and set the flag. please suggest some way to solve my prob. thanx

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      There are many ways to do this. 1 - Handle the session_end event and reset the DB flag there. This event gets fired when session timed out and will happen even user closes browser (not immediately). Works only on InProc session mode. 2 - Create a new column in table which has the user's last request time. Write a SQL job which runs frequently, checks the last request time and update the flag if necessary. :)

      Navaneeth How to use google | Ask smart questions

      n

      N 1 Reply Last reply
      0
      • N N a v a n e e t h

        There are many ways to do this. 1 - Handle the session_end event and reset the DB flag there. This event gets fired when session timed out and will happen even user closes browser (not immediately). Works only on InProc session mode. 2 - Create a new column in table which has the user's last request time. Write a SQL job which runs frequently, checks the last request time and update the flag if necessary. :)

        Navaneeth How to use google | Ask smart questions

        n

        N Offline
        N Offline
        nerzhul86
        wrote on last edited by
        #3

        thanx a lot, will try the 1st option.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups