Regarding Session Expire

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Divas
    New Member
    • Jun 2007
    • 4

    Regarding Session Expire

    Dear Friends


    This problem comes in IE5 browser
    I have a problem and i an very frustrated bcs of that,When a user login his id is maintain in session, and then if he log out that session expires......bu t if we copy the inner link when a user is login and paste in the browser(IE5) then after logout, then that page is opened ("WITHOUT POSTBACK") and if a user want to access any buttons then it redirect to login page........... ...

    So the problem is....... after pasting the link is in browser why that page is open and how can i solve this so that page can not open and redirect to login page....

    Please help me i am very much in trouble bcs of that.



    Thanx
    With Regards
    Divas Gupta
  • shweta123
    Recognized Expert Contributor
    • Nov 2006
    • 692

    #2
    Hi,

    Do you want to say,After copying any page link in IE,it is going to that page even after logout? and then redirecting to Login.asp as session is expired?
    Then I think that behaviour is right.Can you also specify some code details so that we can look into it?

    Originally posted by Divas
    Dear Friends


    This problem comes in IE5 browser
    I have a problem and i an very frustrated bcs of that,When a user login his id is maintain in session, and then if he log out that session expires......bu t if we copy the inner link when a user is login and paste in the browser(IE5) then after logout, then that page is opened ("WITHOUT POSTBACK") and if a user want to access any buttons then it redirect to login page........... ...

    So the problem is....... after pasting the link is in browser why that page is open and how can i solve this so that page can not open and redirect to login page....

    Please help me i am very much in trouble bcs of that.



    Thanx
    With Regards
    Divas Gupta

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      I believe what's happening is that your SessionID cookie is shared between all of your opened IE browsers.

      This means that if you are logged in one IE Browser and you open another, they will share the same SessionID and so each instance of the IE browser is "logged in".

      What you should probably do is for any control that does a postBack (this includes dropDownList changes etc) add in a check to make sure that the session isn't a new session.
      This will prevent the user from preforming any actions even though their session has expired.
      [Code=vbnet]
      Private Sub BTN_myButton_Cl ick(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles BTN_myButton.Cl ick
      If Session.IsNewSe ssion = False Then
      'do code, user is allowed
      Else
      'redirect the user..their session has expired.
      End If
      End Sub
      [/code]


      It does seem sort of weird that this is happening in IE5...I thought this SessionID cookie sharing was new to IE7...Or are you talking about when your application opens a child window?

      -Frinny

      Comment

      • gomzi
        Contributor
        • Mar 2007
        • 304

        #4
        Originally posted by Divas
        Dear Friends


        This problem comes in IE5 browser
        I have a problem and i an very frustrated bcs of that,When a user login his id is maintain in session, and then if he log out that session expires......bu t if we copy the inner link when a user is login and paste in the browser(IE5) then after logout, then that page is opened ("WITHOUT POSTBACK") and if a user want to access any buttons then it redirect to login page........... ...

        So the problem is....... after pasting the link is in browser why that page is open and how can i solve this so that page can not open and redirect to login page....

        Please help me i am very much in trouble bcs of that.



        Thanx
        With Regards
        Divas Gupta
        In my opinion, this problem will occur if you are caching the pages.
        setting no-cache on all the pages will prevent the problem.

        Comment

        Working...