forms authentication with framesets

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
 
R

Richard

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
 
A

Andy Fish

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top