locked
FormsAuthentication RRS feed

  • Question

  • User-797751191 posted

    Hi

      How the below code works

    FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, UserName, DateTime.Now, DateTime.Now.AddMinutes(30), isPersistent, userData, FormsAuthentication.FormsCookiePath);
    string encTicket = FormsAuthentication.Encrypt(ticket);
    Response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName, encTicket));
    Response.Redirect("Default.aspx");

    Thanks

    Saturday, June 22, 2019 5:09 PM

All replies