title: After installing .net 4.5 custom forms authentications break
body: <p>I have just upgraded to VS 2012 from VS2010, and are having some issues with FormsAuthentication. </p>
  
  <p>I have some old code which creates a custom auth cookie to store som information in it:</p>
  
  <pre><code>   public static int SetAuthCookie&lt;T&gt;(this HttpResponse responseBase, string name, bool rememberMe, T userData)
          {
              JavaScriptSerializer serializer = new JavaScriptSerializer();
  
              var cookie = FormsAuthentication.GetAuthCookie(name, rememberMe);
              var ticket = FormsAuthentication.Decrypt(cookie.Value);
  
              var newTicket = new FormsAuthenticationTicket(ticket.Version,
                                                            ticket.Name,
                                                            ticket.IssueDate,
                                                            ticket.Expiration,
                                                            ticket.IsPersistent,
                                                            serializer.Serialize(userData),
                                                            ticket.CookiePath);
  
              var encodedTicket = FormsAuthentication.Encrypt(newTicket);
  
              cookie.Value = encodedTicket;
              responseBase.Cookies.Add(cookie);
  
              return encodedTicket != null ? encodedTicket.Length : 0;
          }
      }
  </code></pre>
  
  <p>After upgrading to .Net 4.5 HttpContext.Current.Request.IsAuthenticated is always null. I have seen that there is a new way to authenticate in .Net 4.5, but I rather not use it, since I won't be able to upgrade the production enviroment from .Net 4.0. Is there a way to set the authentication when using a custom auth cookie?</p>