Frames and Session Timeout

Results 1 to 2 of 2

Thread: Frames and Session Timeout

  1. #1
    Join Date
    Dec 1969

    Default Frames and Session Timeout

    I have an ASPNET solution which is frames-based and uses forms-based authentication.<BR><BR>If a user lets her session timeout and then clicks on one of the menu items, the login screen loads into one of my inner frames. If the user then logs in, the entire frameset gets loaded into the inner frame - not a great outcome.<BR><BR>Is there a way to intercept the session timeout and force the login screen to load into "_parent"?

  2. #2
    Join Date
    Dec 1969

    Default RE: Frames and Session Timeout

    I don&#039;t think you have to intercept the session timeout...<BR><BR>I assume that when they make another request, your login screen loads? (Yeah, just re-read that - you do say).<BR><BR>In which case, add something like this into your login frame:<BR>&#060;script type="text/javascript"&#062;<BR>if(self.location.href != top.location.href){ top.location.href = self.location.href; }<BR>&#060;/script&#062;<BR><BR>That&#039;ll force, when the page gets loaded, it to check whether the "top" (frameset) href is the same as itself. If it&#039;s loaded inside a frameset, it won&#039;t be, so it&#039;ll redirect the outermost frame to the location of your login script.<BR><BR>Fingers crossed that&#039;ll sort it.<BR><BR>By the way, this is sometimes called a "frames breakout script" and similar code can be found around the net through Google (if you want slightly different functionality, for example).<BR><BR>Craig.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts