Re: forms based authentication

From: Luc Kumps (NOkumpsSPAM@pandora.be)
Date: 04/18/03


From: "Luc Kumps" <NOkumpsSPAM@pandora.be>
Date: Fri, 18 Apr 2003 07:36:57 GMT


Perhaps you could use the GetRedirectUrl() method to check where
RedirectFromLoginPage will take you, and use Response.Redirect instead of
RedirectFromLoginPage in case it return "default.aspx"?

Luc K

"buran" <buran@buran.com> wrote in message
news:Owsx6rXBDHA.1016@TK2MSFTNGP12.phx.gbl...
> Hi there,
> I am using forms based authentication and everything works fine except
> something I cannot resolve. If I call a page in my application without
being
> logged in, the application sends me to the login page, that's what it
should
> do. After logging in, I can view the page. But, if I call the login page
> directly, and enter correct credentials, it will look for default.aspx
page
> which is not available. How can I avoid that? Thanks in advance.
>
> Private Sub btnValidate_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles btnValidate.Click
>
> If ValidateUser(txtUserName.Text, txtPassword.Text) Then
>
> FormsAuthentication.RedirectFromLoginPage(txtUserName.Text,
> False)
>
> End If
>
> End Sub
>
>



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)
  • 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)
  • 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)
  • Re: Question about redirecting a user after authentication
    ... RedirectFromLoginPage() works just fine. ... make sure that a querystring "ReturnURL" is appended to ... Once login is validated it will automatically redirect ... If returnURL is absent then ...
    (microsoft.public.dotnet.framework.aspnet)