dodgerfan
asked on
ASP.Net Login/Logout with Forms Authentication issue
I am using Forms Authentication with an ASP.Net website (C#, Visual Studio 2008). If I bring the browser up and login I can get in. When I click the Logout link it goes to the correct page, but if I then try to login again as a different user, I am logged in as the previous user. It seems to be storing the user info and continuing to use it. The only way to log in as a different user is to close the browser and open it again. Any idea how to fix this issue?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
All of the comments had me working through the code to get it working. I was looking in the wrong section. Some redundant stuff I thought I had removed. Once the logout page was redirected to properly, it worked correctly. The On_load event of the logout page runs the Forms.Autrhentication.Sign Out(), plus I put session.abandon in it and finishing it by re-directing back to my main page with the user logged out. I've tested it repeatedly and it's working right. Thanks for all of the ideas, they all got me looking in the right area. I'm going to try and divide up the points.
ASKER
All of these comments/suggestions helped me find the solution.
1) Are your login controls in an UpdatePanel?
2) Have you disabled ViewState?
3) Have you messed with the browser cookies?