simple FormsAuthentication in a secure environment

Discussion in 'ASP .Net Security' started by Craig, Aug 26, 2005.

  1. Craig

    Craig Guest

    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?
    Craig, Aug 26, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. A.M
    Replies:
    5
    Views:
    5,434
    Teemu Keiski
    Jun 8, 2004
  2. Daniel Malcolm
    Replies:
    0
    Views:
    553
    Daniel Malcolm
    Jan 24, 2005
  3. zdrakec
    Replies:
    1
    Views:
    434
    zdrakec
    Jul 25, 2005
  4. Joe
    Replies:
    5
    Views:
    955
    Steven Cheng[MSFT]
    Dec 13, 2005
  5. verbal kint
    Replies:
    1
    Views:
    543
    Sudsy
    Sep 4, 2004
Loading...

Share This Page