title: can we replace form authentication ticket with custom object in form authentication module?
body: <p>In my project there is a requirement to use a custom object in place of  FormAuthenticationTicket. We have created a custom object with same properties as of FormAuthenticationTicket. Now we are using our own encryption method to encrypt this custom object. We have created successfully FormAuthentication cookie. But when we check context.User.Identity.IsAuthenticated property, it remains always false. Here is the code. </p>
  
  <pre><code>    CookieData cookieData = new CookieData();
      cookieData.ExpirationDate = DateTime.Now.AddMinutes(CookieConstants.DefaultFormsAuthTicketTimeout);
      cookieData.LoginToken = LoginToken;
      cookieData.Impersonate = (IsImpersonate ? true : false);
      cookieData.IsPersistent = IsPersistent;
      cookieData.UserData = "&lt;&lt;UserRelated Information&gt;&gt;";
      JavaScriptSerializer js = new JavaScriptSerializer();
      string strCookieData = js.Serialize(cookieData);
      string encryptedTicket = AESEncryption.Encrpyt(strCookieData);
  
       HttpCookie httpCookie = null;
       httpCookie = new HttpCookie(cebCookie.Name, encryptedTicket);
  
  
  
          if (cebCookie.IsPersistent)
          {
              httpCookie.Expires = cebCookie.Expires;
          }
  
          if (!string.IsNullOrEmpty(cebCookie.Url))
          {
              httpCookie.Secure = cebCookie.RequireSSL;
              httpCookie.Domain = cebCookie.Domain;
          }
          httpCookie.Path = FormsAuthentication.FormsCookiePath;
          HttpContext.Current.Response.Cookies.Set(httpCookie);
  </code></pre>
  
  <p>I know that this is a wired requirement.
  Please help.</p>