Re: Forms based authentication's Login page posts back to itself instead of redirecting to requested page.

From: Cowboy \(Gregory A. Beamer\) (N0SpamMPleezEgbworld@comcast.netN0SpamMPleezE)
Date: 12/27/02


From: "Cowboy \(Gregory A. Beamer\)" <N0SpamMPleezEgbworld@comcast.netN0SpamMPleezE>
Date: Fri, 27 Dec 2002 09:47:15 -0600


It should either error or send the user to Default.aspx. If you have a
Default.aspx that does either a Server.Transfer or a Response.Redirect to
Login.aspx, there is your problem.

When a person hits the actual login page, rather than attempts another page,
ASP.NET has nowhere to go, so it uses the hardcoded Default.aspx value,
which cannot be changed. You can check for the presence of a redirect URL
and, if missing, redirect to your default page (whatever its name is) with
either Server.Transfer or Response.Redirect.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Author: ADO.NET and XML: ASP.NET on the Edge
****************************************************************************
****
Think outside the box!
****************************************************************************
****
"Larry Morris" <lwmorris067@msn.com> wrote in message
news:OB4VozZrCHA.720@TK2MSFTNGP12...
> It appears that issuing
> System.Web.Security.FormsAuthentication.RedirectFromLoginPage statement
> doesn't work when the login page is requested directly and that includes
> when the login page is named default.aspx; calling any other page works as
> expected.
>
> Typing http://localhost/myweb/login.aspx will retrieve the login page.
> Attempting to login causes the page to simply post back to itself without
> redirecting.
> Typing http://localhost/myweb/stats.aspx will redirect to the login page.
> After loging in, the page redirects to stats.aspx as expected.
>
>
>


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: doesnt redirect
    ... Look under the Security tab. ... One of them is called the Internet zone and probably the one you are using. ... or better explain what you mean by>> redirect ... I think there are 2 interstitchal pages after submitting those login credentials before you get to the mailbox web page. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Login problem
    ... redirect the user. ... Samuel Shulman wrote: ... Use either Forms Authentication or Basic Authentication. ... If the user types in the url the Login.aspx file then enters the username and the password, clicks the login button and the form validates the values against values from the database ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Stuck with form validation
    ... stay in the login page ... Not quite sure what you are expecting $sql to be. ... #redirect to other page ... Returns the number of rows affected by the last row affecting command, ...
    (perl.dbi.users)