More in this section

Forums / Developing with Sitefinity / Ajax Login posiible?

Ajax Login posiible?

2 posts, 0 answered
  1. jcrichto
    jcrichto avatar
    35 posts
    14 Aug 2012
    20 Feb 2009
    Link to this post
    We are trying to do this in an ajax request.  It works up to theSetAuthenticationCookie.

      public string Login(string username, string password) 
            string msg = String.Empty; 
                bool isvalid=um.ValidateUser(username, password); 
                if (isvalid) 
                    Page p = (Page)HttpContext.Current.Handler; 
                    HttpCookie cookie = p.Response.Cookies[FormsAuthentication.FormsCookieName]; 
                    msg = "success"
                    msg = "invalid"

    The ERROR is :

    Error Occured:
    System.ArgumentException: Invalid value for ’encryptedTicket’ parameter.
    at System.Web.Security.FormsAuthentication.Decrypt(String encryptedTicket)
    at Telerik.Security.UserManager.SetAuthenticationCookie(HttpCookie cookie)
    at UserMethods.Login(String username, String password) in \App_Code\UserMethods.cs:line 56

  2. Parvan
    Parvan avatar
    151 posts
    24 Sep 2012
    20 Feb 2009
    Link to this post
    Hi Jeremy,

    Thank you for contacting us.

    If you upgrade to version 3.6, you can follow the instructions in this article -

    You can use the described AJAX login method to login using username and password credentials.

    Hope this information will helps you.

    Kind regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
2 posts, 0 answered