Re: Basic Security

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Eirik Eldorsen (NOoSPAAAMeirik_at_eldorsens.nettsider.no)
Date: 07/29/04


Date: Thu, 29 Jul 2004 14:49:56 +0200

If you want to control where the user is redirected on login, use this code:

if (FormsAuthentication.Authenticate(txtUsername.Text, txtPwd.Text))
{
     FormsAuthentication.SetAuthCookie(txtUsername.Text, false);
     Response.Redirect("nextpage.aspx");
}
else
{
....
}

"Chris Kennedy" wrote in message
> When a user goes directly to the login page, when they login, it attempts
to
> redirect them to default.aspx, which doesn't exist. I suppose I could
create
> a default aspx page but really I would like to know what is going on
behind
> the scenes. Why doesn't .net apply the same redirect rules to login page
as
> it does to application pages. Regards, Chris.



Relevant Pages

  • Re: Basic Security
    ... Whoever writes the software makes the business rules. ... "Chris Kennedy" wrote in message ... > When a user goes to the application page they are redirected to the login ... Why doesn't .net apply the same redirect rules to login page ...
    (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: 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: .NET forms authentication role-based redirection?
    ... I would consider using a Login View control. ... means of a redirect (maybe examine the Response object to determine this. ... If the page is NOT a redirect you could display some ... I think a View control would probably work easiest. ...
    (microsoft.public.dotnet.framework.aspnet)