To avoid multiple login for the same user in different systems, i want to force login in second system and want to quit
session in first system.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaganathan BantheswaranPosted Oct 23, 2013, 5:25 AM
First you have to add two columns in User table called SessionID & IsLoggedIn to store the currently logged in users session id & logged in status[true/false].
In Application_PreRequestHandlerExecute event in global.asax file,
check,
if the user is loggedin
if session id is not same,
make isloggedin = false; & save.
insert a new record for loggedin user [set sessionid, isloggedin.....].
else
insert a new record for loggedin user [set sessionid, isloggedin.....].
Jaganathan BantheswaranPosted Oct 24, 2013, 1:15 AM
Mark it as Answer if it helped you. So that others can use the solution.
Veena RaviPosted Oct 24, 2013, 12:43 AM
Jaganathan BantheswaranPosted Oct 23, 2013, 7:32 AM
You can.
if session id is not same display confirm box using RegisterClientScriptBlock from Code behind.
in this confirm box script code, check if they have clicked on Yes, if yes, then redirect to home else redirect to login page.
Veena RaviPosted Oct 23, 2013, 5:56 AM