Session problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fuhrer
    New Member
    • Dec 2006
    • 30

    Session problem

    Hi all,

    I have a page in my web application that contains a "login as" functionality(a dmin can login as the selected user).
    Once this button is clicked, it opens a new window and login automatically.

    My problem is:
    In my new opened widow, when i click logout(that clears all sessions)
    it clears also the sessions in the opener window.
    how could i prevent this.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Originally posted by Fuhrer
    Hi all,

    I have a page in my web application that contains a "login as" functionality(a dmin can login as the selected user).
    Once this button is clicked, it opens a new window and login automatically.

    My problem is:
    In my new opened widow, when i click logout(that clears all sessions)
    it clears also the sessions in the opener window.
    how could i prevent this.
    I don't understand your problem....mayb e you don't understand how Session works?

    Session is used to maintain information across multiple pages in the application. When you call the Session.Abandon method then that user's Session is abandoned and all of the information that was previously saved in Session (that was available to the user in all pages in your application) is deleted...there fore the data is no longer available to the user.

    If you call the Session.Abandon method on any page that the user is viewing then any other page using this information will no longer have access to it.

    You are probably storing an Object in Session that identifies the user is logged in. When you call the Session.Abandon method this Object is deleted along with the rest of the data stored in Session..and so the user is "logged out".

    Your application uses multiple windows but all of these windows talk to the same application. They all use the same Session. So if the user clicks LogOut they should be logged out no matter what window they're in or what page their viewing because you are abandoning the user's Session.

    If this isn't what you want, then remove the log out button from page being displayed the child window.

    Comment

    Working...