Can I force a log out through SQL for asp.net membership account?
+1
A:
For forms authentication you can use:
FormsAuthentication.SignOut();
FormsAuthentication.RedirectToLoginPage();
If you are trying to do this through Windows authentication see this.
David Glass
2009-12-15 18:50:56
I specifically asked for SQL.
progtick
2009-12-15 20:23:50
Not sure I understand than, what do you mean through SQL. What Authentication are you using? Forms, Windows, or Passport?
David Glass
2009-12-15 20:42:34
I am using Forms Authentication. But I am trying to log someone out inside of my SQL code, but that seems impossible.
progtick
2009-12-15 22:03:33
+1
A:
No record of currently logged in users are stored in Forms Authentication mode so it would be impossible to log out a user by some SQL execution alone.
Note that a data store like SQL is only used during the actual credential authentication step of the Forms Authentication lifetime:
Forms Authentication generally utilizes client-side cookies to handle currently logged in users.
ddc0660
2009-12-15 20:46:06