Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > redirect unauthenticated users from frameset child pages?

Reply
Thread Tools

redirect unauthenticated users from frameset child pages?

 
 
=?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=
Guest
Posts: n/a
 
      11-02-2005
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?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=
Guest
Posts: n/a
 
      11-02-2005
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?

 
Reply With Quote
 
 
 
 
Bruce Barker
Guest
Posts: n/a
 
      11-02-2005
it would be cleaner to have the frameset page check first.

-- bruce (sqlwork.com)


"William Sullivan" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> 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?



 
Reply With Quote
 
=?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=
Guest
Posts: n/a
 
      11-02-2005
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" <(E-Mail Removed)> wrote in
> message news:(E-Mail Removed)...
> > 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?

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protecting unauthenticated users from downloading .swf files Klaus Jensen ASP .Net 1 06-19-2008 10:37 PM
Problem using login control when site has both authenticated an unauthenticated users Keithb ASP .Net 0 10-28-2006 10:25 PM
Passing values from Child window with frameset to Parent window with frameset jimmyfishbean@yahoo.co.uk Javascript 0 07-11-2006 09:05 AM
membership and redirect of unauthenticated requests Jerry C ASP .Net Security 3 06-16-2006 05:51 AM
Frameset, Selected Index, Target Frameset relchatt@comcast.net ASP .Net 0 09-29-2004 09:37 PM



Advertisments