programmatically logout a "specific" user

Posted by MD_Oppenheimer on Stack Overflow See other posts from Stack Overflow or by MD_Oppenheimer
Published on 2010-06-14T17:48:07Z Indexed on 2010/06/14 17:52 UTC
Read the original article Hit count: 490

Filed under:
|
|

Is it possible in Asp.NET MVC to proframmatically logout a user? I am aware that you can use: FormsService.SignOut(); But this refers to the context of the webpage making the request. I'm trying to prevent a user logging in twice. So if I call:

MembershipUser membershipUser = Membership.GetUser(userName); if (membershipUser.IsOnline == true) { // log this user out so we can log them in again FormsService.SignOut();

}

calling: FormsService.SignOut(); has no bearing on the context of the user say, with another webbrowser who is logged in already??

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about mvc