Re: RedirectFromLoginPage: Returns to login page.

From: Dominick Baier [DevelopMentor] (dbaier_at_pleasepleasenospamdevelop.com)
Date: 09/26/05

  • Next message: Tim Murphy: "Re: RedirectFromLoginPage: Returns to login page."
    Date: Mon, 26 Sep 2005 09:09:35 -0700
    
    

    Hello Tim,

    use www.fiddlertool.com to check if the cookie gets transmitted properly
    and if IE sends the cookie on subsequent requests.

    ---------------------------------------
    Dominick Baier - DevelopMentor
    http://www.leastprivilege.com

    > I'm using the following code in my login.aspx page to validate a user.
    > The FormsAuthentication.RedirectFromLoginPage(cUser,bPersistent) gets
    > called but login.aspx gets redisplayed instead of returning to the
    > calling page. If I change the address line in IE to the calling page I
    > can see the new user has been logged.
    >
    > I'm using Windows 2000 Pro + ASP.Net 1.1.
    >
    > Any ideas what the problem is?
    >
    > Tim
    >
    > <script language="VB" runat="server">
    >
    > Sub ProcessLogin(objSender As Object, objArgs As EventArgs)
    >
    > Dim cUser As String
    > Dim cPassword As String
    > Dim bPersistent As Boolean
    > cUser = txtUser.Text
    > cPassword = txtPassword.Text
    > bPersistent = chkPersistLogin.Checked
    > ' This is were I should compare to the database.
    > If True Then
    > FormsAuthentication.RedirectFromLoginPage(cUser,bPersistent)
    > Else
    > ErrorMessage.InnerHtml = "<b>Something went wrong...</b> please
    > re-enter
    > your credentials..."
    > End If
    > End Sub
    >
    > </script>
    >


  • Next message: Tim Murphy: "Re: RedirectFromLoginPage: Returns to login page."

    Relevant Pages

    • Re: RedirectFromLoginPage: Returns to login page.
      ... Tim ... > Dim cPassword As String ... > Dim bPersistent As Boolean ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • RedirectFromLoginPage: Returns to login page.
      ... login.aspx gets redisplayed instead of returning to the calling page. ... Dim cPassword As String ... Dim bPersistent As Boolean ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Re: Ticket disappears when browser is closed
      ... be careful - if the cookie is save to the users harddrive - anyone who has access to that directory can grab the cookie and bypass authentication. ... Dim New DatabaseUser ... Dim userData As String = DatabaseUser.UserData ... ByVal PersonID As Integer, ByVal roles As String) ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Re: DESPERATE: FormsAuthentication Problem
      ... > them in the forms authentication cookie. ... > ' Get ";" delimited string of the user's roles from the database ... > Dim authTicket As FormsAuthenticationTicket = New ...
      (microsoft.public.dotnet.framework.aspnet)
    • DESPERATE: FormsAuthentication Problem
      ... them in the forms authentication cookie. ... from the forms authentication cookie, create a new FormsIdentity object, ... ' Get ";" delimited string of the user's roles from the database ... Dim authTicket As FormsAuthenticationTicket = New ...
      (microsoft.public.dotnet.framework.aspnet)