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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Oct 23, 2013, 1:25 AM EDT
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.....].
Veena Ravi22 reputationPosted Oct 23, 2013, 1:56 AM EDT
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Oct 23, 2013, 3:32 AM EDT
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 Ravi22 reputationPosted Oct 23, 2013, 8:43 PM EDT
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Oct 23, 2013, 9:15 PM EDT
Mark it as Answer if it helped you. So that others can use the solution.