473,320 Members | 1,920 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

forms authentication with framesets

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
Nov 18 '05 #1
2 2863
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

"Andy Fish" <aj****@blueyonder.co.uk> schreef in bericht
news:w2*********************@news-text.cableinet.net...
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

Nov 18 '05 #2
thanks, that looks like a neat trick

"Richard" <ri*****@nospam.com> wrote in message
news:40***********************@newsreader.eweka.nl ...
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

"Andy Fish" <aj****@blueyonder.co.uk> schreef in bericht
news:w2*********************@news-text.cableinet.net...
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


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms...
3
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
2
by: Eric | last post by:
I am trying to build an app where the stuff in the root directory is open to all, but anything under the Restricted directory requires you to login and I want to use Forms to do it. I'm having...
0
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET...
7
by: Justin | last post by:
I am trying to password protect a subdirectory using forms authentication. I am using the "Location" tag to specify the directory to be protected. The login.aspx page is in the root directory of...
5
by: V. Jenks | last post by:
Using forms authentication, can I control which pages and/or directories a user would have access to or is that only available with Windows authentication? Thanks!
4
by: =?Utf-8?B?R3V1czEyMw==?= | last post by:
Hi, I created a web site on a remote server. To logon the user must enter a user id and password. The site is uses Forms Authentication. The web config file looks as follows: ...
4
by: Bjorn Sagbakken | last post by:
In a web-application with login creds (user, pwd), these are checked against a user table on a SQL server. On a positive validation I have saved the userID, name, custno and role-settings in a...
5
by: Rory Becker | last post by:
Having now created a Custom MembershipProvider that seems to work correctly with my Logon and ChangePassword controls, I am, as they say, a happy bunny. The next stange is to move on to the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.