473,406 Members | 2,312 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,406 software developers and data experts.

redirect unauthenticated users from frameset child pages?

Have a frameset HTML page (parent) with child .aspx pages. When each of the
child pages loads, it checks to see if the user is authenticated, and if not,
redirects to the login page:

if(!this.Context.User.Identity.IsAuthenticated)
{
Response.Redirect("Login.aspx",true);
}

The problem is that if I go to the parent page directly, I get four versions
of the login page, each in a different frame. How do I redirect the browser,
not just the frame, to the login page?
Nov 19 '05 #1
3 2590
Should have checked before I posted. Plenty of info about this out there.
My solution was: For each frame page save the header page, I replaced
Response.Redirect with plain ol' Response.End() to prevent anything from
showing from those pages. To the header page, I replaced Response.Redirect
with:

Response.Write("Redirecting to Login.aspx. Click <a
href=\"Login.aspx\">here</a> if this fails.");
Response.Write("<script language='javascript'>top.location.href
=\"Login.aspx\"</script>");
Response.End();

This writes out a javascript line that will redirect the frameset page to
the login page, and if this fails for some reason, leaves an informative
message and link for users.

"William Sullivan" wrote:
Have a frameset HTML page (parent) with child .aspx pages. When each of the
child pages loads, it checks to see if the user is authenticated, and if not,
redirects to the login page:

if(!this.Context.User.Identity.IsAuthenticated)
{
Response.Redirect("Login.aspx",true);
}

The problem is that if I go to the parent page directly, I get four versions
of the login page, each in a different frame. How do I redirect the browser,
not just the frame, to the login page?

Nov 19 '05 #2
it would be cleaner to have the frameset page check first.

-- bruce (sqlwork.com)
"William Sullivan" <Wi*************@discussions.microsoft.com> wrote in
message news:2A**********************************@microsof t.com...
Have a frameset HTML page (parent) with child .aspx pages. When each of
the
child pages loads, it checks to see if the user is authenticated, and if
not,
redirects to the login page:

if(!this.Context.User.Identity.IsAuthenticated)
{
Response.Redirect("Login.aspx",true);
}

The problem is that if I go to the parent page directly, I get four
versions
of the login page, each in a different frame. How do I redirect the
browser,
not just the frame, to the login page?

Nov 19 '05 #3
I agree. However, when I added the frameset page, VS added it as a plain
HTML page. Can I convert the frameset page to aspx and use its page_load
event to do this checking? I would prefer to do this, but I'm not sure that
it would work.

"Bruce Barker" wrote:
it would be cleaner to have the frameset page check first.

-- bruce (sqlwork.com)
"William Sullivan" <Wi*************@discussions.microsoft.com> wrote in
message news:2A**********************************@microsof t.com...
Have a frameset HTML page (parent) with child .aspx pages. When each of
the
child pages loads, it checks to see if the user is authenticated, and if
not,
redirects to the login page:

if(!this.Context.User.Identity.IsAuthenticated)
{
Response.Redirect("Login.aspx",true);
}

The problem is that if I go to the parent page directly, I get four
versions
of the login page, each in a different frame. How do I redirect the
browser,
not just the frame, to the login page?


Nov 19 '05 #4

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

Similar topics

3
by: Steve | last post by:
I have a page which has some frames. After processing one of the pages I want to redirect to another frameset. However, when I use Response.Redirect I end up with a frameset with the frameset...
3
by: Justin | last post by:
Hi, Im confused here over the usage of Response.Redirect and Server.Transfer. I used frameset for my work, what are the proper usages of the two methods that seems working similar.. The...
2
by: Charlie | last post by:
Hi: I have a button in an .aspx page in banner section of a frameset. It runs a response.redirect to another page. The problem is page loads into active frameset. I would like page to replace...
1
by: Tony Zoccolillo | last post by:
I have a toolbar aspx page in a frameset. On the toolbar is a dropdownlist. The frameset is launched from an outside source and comes in with a specific parameter for the module desires, like......
3
by: Paul Evans | last post by:
Hi, I've set up forms based authentication. What I'm not sure how to do is redirect visitors (who have not logged on) to the registration page, when they request a web page they are not...
2
by: news://news.microsoft.com/microsoft.public.de.germ | last post by:
Hallo! Ich habe ein Frameset mit 3 Frames. Im 1. Frame wird eine ASPX-Seite geöffnet. In dieser werden einige Steuerelemente angezeigt. Nun soll bei bestimmten Benutzeraktivitäten eine andere...
15
by: KBuser | last post by:
I recently developed an internal website with various queries against our SQL server. I added buttons with Response.Redirect. These buttons do not work with Internet Explorer, however when using...
0
by: =?Utf-8?B?U2VtU2Vt?= | last post by:
Helloz iam working in a web application for univesity. ihave diffrent kind of roles like: 1-Studetn Affairs 2-Staff imake three sperate master pages for them.: example:
1
by: =?Utf-8?B?U2VtU2Vt?= | last post by:
Helloz iam working in a web application for univesity. ihave diffrent kind of roles like: 1-Studetn Affairs 2-Staff imake three sperate master pages for them.: example:
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.