Thursday, March 22, 2012

Maintaining user login

Hello,

I want to implement user login system.
Iam setting a field user_login field in a database.
Every time user logins this user_login sets to 1.
and when user log out this field user_login sets to 0.

But how to maintain if user close window then i want to set this field to 0.
How can I inform server to set this field to 0 when browser window close??
I have entered the code in Session_End but it is not working, as
it is not able to find user ID whose field I have to set to 0.

Thanks in advance.Hi,

what mode is your sessionstate in (inproc, sqlserver, ...)? Only InProc seems to fire the Session_OnEnd event properly.

Grz, Kris.
Yes Iam using InProc .
Hi,

also know that the session times out only x minutes after the user has left the site. Maybe you can provide some relevant code that doesn't work out for you so we can take a look at it. Please use the proper tags when posting code to these forums:view post 98605.

Grz, Kris.

0 comments:

Post a Comment