Last post Jun 21, 2007 02:43 PM by toranaga1984
Apr 12, 2005 02:29 PM|hubert_chn|LINK
hi, i use
to log out users, but it does not seem to work...
coz if after clicking "logout", i type in a web address which requires login, the page still opens. is there anything else needs to be done with that??
Apr 12, 2005 06:38 PM|sevenhalo|LINK
The page that's allowing you access needs to determine if that person has previously logged in.
If this page is on the intranet, I would use Session values. Every page should start out with something like the following:
As far as logging out goes, just set the session value to false onClick and it should redirect them to login.aspx if you type in the url.
Apr 12, 2005 07:06 PM|vamsi2|LINK
Did you make sure that you have reset all your session variables and cookies when you are logging out. From the snippet that you posted, I can't see that you have.
Apr 12, 2005 10:39 PM|hubert_chn|LINK
thanks guys, so.... yes i used sessions on the login page...
so in the case that session is used, all sessions need to be cleared before FormsAuthentication.SignOut() is called?
Mar 01, 2007 05:56 PM|vamsi2|LINK
Mar 01, 2007 08:19 PM|papalolo22|LINK
Jun 21, 2007 02:43 PM|toranaga1984|LINK
I have a somewhat similar problem with the delay. I am populating a list with 10 random online users. The problem is a user that just logged out will show in that list.
Here is the code that selects the online users:
MembershipUserCollection allUsers = Membership.GetAllUsers();
List<MembershipUser> onlineUsers = new List<MembershipUser>();
foreach (MembershipUser usr in allUsers)
if (usr.IsOnline && usr.UserName!= Page.User.Identity.Name) onlineUsers.Add(usr);
I tryed Response.Clear in the logout method. Also, even if the user still shows in this list, he cannot reenter a protected page after logout.