Re: Custom redirectURL

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



re:
> How do I tell ASP.NET that if the forms based authentication
> is successful, take this guy to this page, say, "db.aspx"?

You can't.

What you could do is :

1. set the default page for the application to "db.aspx"

or

2. In "default.aspx", if that's your default page, or in whatever page
you have set the default page to, set a Response.Redirect("db.aspx")



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Water Cooler v2" <wtr_clr@xxxxxxxxx> wrote in message
news:1125190047.715175.76850@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> In Forms based authentication mode, say my login page has to be
> redirected to "db.aspx" if the login was successful, how do I supply
> this redirect without a Response.Redirect() using FormsAuthentication
> class?
>
> If I simply say,
>
> If MyDatabaseUserAuthenticationMethod(txtUserName.Text,
> txtPassword.Text) Then
> FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, False)
> Else
> lblMessage.Text = "Please jump into the well and die."
> End If
>
> and if the user logs in correctly, then he will, by default, be
> redirected automatically to the "default.aspx" page if it exists. If
> the page does not exist, he will come back to the login page because no
> where in the login page have we specified an equivalant of the
> primitive "action" attribute that tells whom to POST the page to, so
> the same page will recieve a POSTBACK.
>
> How do I tell ASP.NET that if the forms based authentication is
> successful, take this guy to this page, say, "db.aspx"?
>


.



Relevant Pages

  • Re: Default.aspx - newbie Q`
    ... check and redirect to the ReturnURL or Selected.aspx depending on the case. ... > and replace it with something that takes then straight to the login page. ... >> Curt Christianson ... >>> authentication ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Default.aspx - newbie Q`
    ... check and redirect to the ReturnURL or Selected.aspx depending on the case. ... > and replace it with something that takes then straight to the login page. ... >> Curt Christianson ... >>> authentication ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ASP 2.0 Membership API
    ... After successful authentication, you want to redirect back to the original application, but the returnURL parameter contains only /App1 as the URL. ... The solution to that problem is adding a local login page to the application that does a manual redirect to the central authentication application. ... if not you have to use cookieless auth ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Detecting Failed Authorization
    ... after every authentication request and before the user ... is redirected to any login page. ... > "Ken Dopierala Jr." ... >> 'Redirect where you want the user to go. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Response.Redirect with IE
    ... login page to another one after a successful login - Am I right? ... In that case, set the Authentication mode to "Forms" in Web.Config, set the ... You don't have to manually redirect, Forms Authentication will do it for you ... > From: Ken Dopierala Jr. ...
    (microsoft.public.dotnet.framework.aspnet)