Session sticks around when url manually typed in IE RRS feed

  • Question

  • Hi everyone,

    This is my first post here on the forum. Sorry if this is the wrong forum.
    I have a question regarding Sessions.(I posted parts of my code for readability)

    I have a Masterpage with 1 content page: Default.aspx.
    I have a Login.aspx and a Logout.aspx

    I create a session this way in Login.aspx:

    Session["username"] = TextBoxUserName.Text;

    Now im redirect with Response.Redirect to Default.aspx. This is going fine. Now I go to Logout.aspx
    There is set the session to null:

    Session["username"] = null;

    I'm redirected to Default.aspx and with the session nulled immediately redirected to Login.aspx
    Everything fine you should think. Now I have a weird bug. When i mannualy type in Default.aspx the session seems to be cached or something because the redirect check in Page_Load is never executed and the page does not redirect to Login.aspx

    This only happens in Internet Explorer (I tested 7 and 8). Firefox it works fine.

    Does anyone happen to know where my i made a fault? If you need more code I can post it.



    • Moved by nobugz Monday, March 9, 2009 12:02 PM forums.asp.net (Moved from Common Language Runtime to Off-Topic Posts (Do Not Post Here))
    Monday, March 9, 2009 9:02 AM