Saturday, March 31, 2012

Session Timeout using frames

Hello,
My main ASP.NET interface uses frames. The problem is that once the session
times out (if the user hasn't yet closed the browser), the user is
automatically redirected to the login screen (setup in Web.Config file), but
this occurs for every frame!!! Is there a way to redirect away from the main
interface completely?
Thanks!your frame page is html or aspx?
if it is html try to rename in aspx!
"Bilbo" <Bilbo@.cox.net> wrote in message
news:OSWo03XVEHA.1652@.TK2MSFTNGP09.phx.gbl...
> Hello,
> My main ASP.NET interface uses frames. The problem is that once the
session
> times out (if the user hasn't yet closed the browser), the user is
> automatically redirected to the login screen (setup in Web.Config file),
but
> this occurs for every frame!!! Is there a way to redirect away from the
main
> interface completely?
> Thanks!
>
In the Login Page add this Client Side Code so that you can "Break Away
From Frames"
<Script Language="JavaScript">
if (top != self) {top.location.href = self.location.href;}
</Script -->
Trevor Benedict R
MCSD
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Its kinda irritating but I found a solution for it.
Use this javascript so the login page will "bust out of frame".
<script>
if (parent.frames.length > 0) {
parent.location.href = self.document.location
}
</script>
This script make sure that the page will bust out of frame, so you only have
one login page.
Richard
"Bilbo" <Bilbo@.cox.net> schreef in bericht
news:OSWo03XVEHA.1652@.TK2MSFTNGP09.phx.gbl...
> Hello,
> My main ASP.NET interface uses frames. The problem is that once the
session
> times out (if the user hasn't yet closed the browser), the user is
> automatically redirected to the login screen (setup in Web.Config file),
but
> this occurs for every frame!!! Is there a way to redirect away from the
main
> interface completely?
> Thanks!
>

0 comments:

Post a Comment