I'm trying to log the user out of another machine. I'm looking at the login form trying to login, so there is no current user session or cookies yet. I do have the credentials, however, because I just tried to login. This method partially works:
The user's session ends on the other machine, but the current machine still tells me the user is logged in elsewhere. The database reflects the user being logged out, so I'm thinking it's an issue with some cached data not being flushed. As soon as I restart the web app, it will let me log in.
Can you tell me exactly what code is used on the sitefinity login form when you click "Log the other user off and enter"?
Interestingly, I just noticed after I call the Logout method above, the Sitefinity login form let's me in without warning... so I know it's working, but why does this still not let me programmatically login? Maybe my logout is fine, but logging in with AuthenticateUser is not doing the same thing as the Sitefinity login form.
UserLoggingReason reason = SecurityManager.AuthenticateUser("Default", username, password, false);
Can you also tell me the exact code that Sitefinity uses to login a user? I know I've seen different answers to this over time, so maybe my approach is out of date.