simple FormsAuthentication in a secure environment

From: Craig (Craig_at_discussions.microsoft.com)
Date: 08/26/05

  • Next message: Dominick Baier [DevelopMentor]: "Re: Check the username and password with the active directory"
    Date: Fri, 26 Aug 2005 07:01:03 -0700
    
    

    I'm doing a very simple call like this:
    if (MyUser.MyCustomAuthenticate(txtUsername.Text, txtPassword.Text))
    {
    //set a cookie
    HttpCookie myCookie= new HttpCookie("cookie_name");
    myCookie.Value = txtUsername.Text;
    myCookie.Expires = DateTime.Now.AddDays(7);
    Response.Cookies.Add(myCookie);

    //forms authentication
    FormsAuthentication.RedirectFromLoginPage( txtUsername.Text,
    chkRemember.Checked);
    }

    This works fine in multiple environments, but now I'm attempting to run this
    code on a server with very limited security rights. I believe that the
    RedirectFromLoginPage is not setting the security ticket and cookie.
    Assuming a very strict environment, what should I look for in order to give
    FormsAuthentication.RedirectFromLoginPage to do what it needs to do?


  • Next message: Dominick Baier [DevelopMentor]: "Re: Check the username and password with the active directory"

    Relevant Pages

    • RE: Forms authentication cookie handling question (C#)
      ... I also replaced all of my ticket authentication code with the ... // Username and or password not found in our database... ... LoginControl's default code logic to generate authentication cookie. ...
      (microsoft.public.dotnet.framework.aspnet)
    • RE: Forms Authentication
      ... The DNS entry for my domain was not set corrretly, ... This should have overcome the cookie ... authentication ticketis not correctly set to the domain your ... Microsoft MSDN Online Support Lead ...
      (microsoft.public.dotnet.framework.aspnet)
    • RE: Forms authentication cookie handling question (C#)
      ... programmatically generate forms authentication ticket and set it in ASP.NET ... You use the Login control's "Authentication" event to do the user ... LoginControl's default code logic to generate authentication cookie. ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: authentication cookie vs session cookie
      ... level of using authentication cookies on the client machines. ... authentication cookie on a manager's machine is stolen and used on a client ... > session variables as it relies on the session cookie that ASP.NET sends to ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • RE: forms authentication cookie problem
      ... authentication cookie. ... what's going on on the server. ... >324488 Forms Authentication and View State Fail ... >characters, the browser will still request the page, but ...
      (microsoft.public.dotnet.framework.aspnet.security)