logout in asp.net
-
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
-
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
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
-
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