Re: Question about redirecting a user after authentication

From: Fluker (flu_at_youidiot.org)
Date: 02/18/04


Date: Wed, 18 Feb 2004 16:31:27 +0530

Hi,

RedirectFromLoginPage() works just fine. If you redirect to login
page manually, make sure that a querystring "ReturnURL" is appended to
URL with value of ApplicationPath + "/" + "yourpage.aspx", and this value
is server encoded. Once login is validated it will automatically redirect
user
to page in that querystring. If returnURL is absent then
RedirectFromLoginPage
redirects to "default.aspx" in base directory.

Hope this helps,

FLU.

"Simon Harvey" <simon.harvey@the-web-works.co.uk> wrote in message
news:e9VPTbg9DHA.2856@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> This is a very typical requirement so I'm sure the answer is very
> straightforward.
>
> If a user tries to get to a secure directory, they can be a sent to a
login
> page automatically. Once the user has been authenticated, a call to,
> FormsAuthentication.RedirectFromLoginPage()
> will send the user to the page he had been originally trying to reach.
>
> Good. Thats very handy and something I definately want to use. The problem
> is, what do I do when the user navigates directly to the login page of
> his/her own accord. In this case,
> when the user is authenticated, I might want to just send them to a
default
> page.
>
> My question is, how do I detect whether or not I should use
> RedirectFromLoginPage() or another method that just redirects the user to
a
> page of my choosing.
>
> I hope that makes sense! Thank you to anyone who can help me with this
>
> Simon
>
>



Relevant Pages

  • Forms Authentication without Login Page
    ... using RedirectFromLoginPage()? ... My reason for asking is that I'm trying to use Forms Authentication to allow ... the MS examples show using a Login page that users are redirected to if they ... explicitly log the user in but without redirecting to ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: NEWBIE-"RedirectFromLoginPage"
    ... The method RedirectFromLoginPage() redirects to default.aspx. ... > Trying to make a login page to a website. ... > Requested Url: /mmgims/default.aspx ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RedirectFromLoginPage
    ... if the ReturnURL parameter is blank when the RedirectFromLoginPage method is ... Depending upon the login status the login button performs either a login or ... Sub Page_Load ...
    (microsoft.public.dotnet.framework.aspnet)
  • RedirectFromLoginPage
    ... if the ReturnURL parameter is blank when the RedirectFromLoginPage method is ... Depending upon the login status the login button performs either a login or ... Sub Page_Load ...
    (microsoft.public.dotnet.security)
  • How To Determine Permission Requirements for a Resource?
    ... How do I check from a login page if the user is ... have permissions to view a requested resource? ... querystring. ... bookmarks the login page that contains the returnUrl in the ...
    (microsoft.public.dotnet.framework.aspnet.security)