Re: Response redirect Doesnt Work

From: Randy Charles Morin (rmorin_at_kbcafe.com)
Date: 11/27/03


Date: 26 Nov 2003 21:26:08 -0800

Have you tried calling Response.End after the redirect? I do it out of
habit, don't know if it actually makes a dif.

Randy
http://www.kbcafe.com

"dave" <dave@edin.co.uk> wrote in message news:<#Ts7iTFtDHA.560@TK2MSFTNGP11.phx.gbl>...
> Why oh why doesnt this work???
>
>
> I have a simple forms authentication that all works fine, ie it validates
> user details against a db.
>
> When i try to redirect it goes off to nowhere.
>
> eg - code snippet:
>
> FormsAuthentication.SetAuthCookie(dat("USER_ID"), AutoLogin.Checked)
> Context.Response.Redirect("index.aspx")
> 'and tried just Response.Redirect("index.aspx")
>
> Both of which look like they are going off somewhere, but never reach the
> desired page. I have also tried the following within the <HTML> tag, but
> still the same result?
>
> if User.Identity.IsAuthenticated then
> response.redirect("index.aspx")
> end if
>
>
> This is driving me totally nuts!
>
> Hope someone can help.



Relevant Pages

  • Re: Login to redirect to https:// page
    ... sure how to redirect it ... to the secure page. ... > Hi Randy, ... message are best directed to the newsgroup/thread from which they ...
    (microsoft.public.dotnet.security)
  • Re: Login to redirect to https:// page
    ... Randy ... > You can check to make sure that the connection is secure ... > by testing Request.IsSecureConnection and then redirect if ...
    (microsoft.public.dotnet.security)