session management in asp.net

Posted by Klbaiju under ASP.NET on 8/23/2012 | Points: 10 | Views : 4983 | Status : [Member] | Replies : 3
Hi friends,

in my application.there is signin and signout.

while sign in to the application there is a checking for whether the user is already signin.if it is already sign in there is another option for signout the seesion.ie there is a link comes click to signout your current session.after clicking that another message will come,you can now login. everything is working fine.

my problem is if i sign in to one system ,without signout if i sign in from other system with same userid .i want session out the session from first system.

means allows only one login at a time.how it is possible. some tutorial says that, set variables in global.asax file.

anybody know plz help me

Regards

Baiju




Responses

Posted by: Ningle on: 8/23/2012 [Member] Starter | Points: 25

Up
0
Down
you can use session out or Session.Abandon()
please refer below links:
http://msdn.microsoft.com/en-us/library/ms524310.aspx

or you can use HttpSessionState object
refer below link:
http://msdn.microsoft.com/en-us/library/system.web.sessionstate.httpsessionstate_members.aspx

i hope,it will help you. :)

All d best


Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nadh123 on: 8/23/2012 [Member] Starter | Points: 25

Up
0
Down
once user login database level maintain login status='y'
another system login check in condition loginsttaus
logout the application login status='N' update it

i hope,it will help you. :)


Mahendra
91-9908699686

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rambabu123 on: 8/23/2012 [Member] Starter | Points: 25

Up
0
Down
when a person login that count maintain in cookie // its work same system
if(cookiecount>1)
restrict login

if u want different systems u will maintain database level

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response