forms authentication with framesets

  • Thread starter Thread starter Andy Fish
  • Start date Start date
A

Andy Fish

Hi,

I have a problem using forms based authentication with a frameset.

I made sure the containing frameset is an aspx so the first time the user
tries to access the application he just gets the login page, and the
frameset doesn't appear until after he's logged in

However, when the user's login session times out and he subsequently tries
to work in one of the frames (i.e. clicks a link). that individual frame
redirects to the login screen. This is OK if he's in the "main" pane but
looks silly if he has clicked on the narrow "menu" frame on the left hand
side.

What I want is for the whole frameset to clear and be replaced by the login
screen.

I can see that the solution would have to be client-side (which is why I
suspect the problem is not specific to forms authentication) but I'm stuck
for a workable option.

Anyone got any ideas of how to do this? How about it I abandon forms
authentication and roll my own authentication - is it possible then?

Thanks for your help

Andy
 
Dear Andy,

I had the same problem as you and I fixed it by putting a javascript "bust
out of frame" in the login.aspx page

<script>
if (parent.frames.length > 0) {
parent.location.href = self.document.location
}
</script>

Greets,

Richard
 
thanks, that looks like a neat trick

Richard said:
Dear Andy,

I had the same problem as you and I fixed it by putting a javascript "bust
out of frame" in the login.aspx page

<script>
if (parent.frames.length > 0) {
parent.location.href = self.document.location
}
</script>

Greets,

Richard
 
Back
Top