Response.cookies.add seems to not add cookie
<p>So I have an authentication method
which looks like the following</p>

<pre><code> public ActionResult SignIn( SignInModel model, string returnUrl )
        {
            if ( ModelState.IsValid )
            {
                var user = accountService.Authenticate(model.UserName, model.Password);
                if ( user != null)
                {
                    var cookie = ApplicationHelpers.SetupFormsAuthTicket( user, model.RememberMe );

                    Response.Cookies.Add(cookie);

                    if ( Url.IsLocalUrl( returnUrl ) &amp;&amp; returnUrl.Length &gt; 1 &amp;&amp; returnUrl.StartsWith( "/" )
                        &amp;&amp; !returnUrl.StartsWith( "//" ) &amp;&amp; !returnUrl.StartsWith( "/\\" ) )
                    {
                        return Redirect( returnUrl );
                    }
                    else
                    {
                        return Redirect("/" );
                    }
                }
                else
                {
                    ModelState.AddModelError( "", "The user name or password provided is incorrect." );
                }
            }
            return View( model );
        }
</code></pre>

<p>It gets hit as expected.</p>

<p>when the user has successfully authenticated it redirects to another url and the Globab.asax (Application_Postauthenticaterequest) gets hit.
my problem is that </p>

<pre><code> HttpCookie authCookie = Request.Cookies[ FormsAuthentication.FormsCookieName ];
</code></pre>

<p>is always null.</p>

<p>I'm creating the cookie in the following 2 methods</p>

<pre><code>public static HttpCookie SetupFormsAuthTicket( OutsourcingPrincipal user, bool isPersistent = false )
        {
            string encTicket = SetupFormsCookie( user, isPersistent );
            return new HttpCookie( FormsAuthentication.FormsCookieName, encTicket );
        }

        private static string SetupFormsCookie(  OutsourcingPrincipal user, bool isPersistent )
        {
            var serializeModel = new OutSourcingPrincipalSerializeModel();   
            serializeModel.FirstName = user.FirstName;
            serializeModel.LastName = user.LastName;
            serializeModel.Username = user.Username;
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            string userData = serializer.Serialize( serializeModel );

            var ticket = new FormsAuthenticationTicket( 1,
                                                    user.Username,
                                                    DateTime.Now,
                                                    DateTime.Now.AddMinutes(30),
                                                    isPersistent,
                                                    userData );
            var encTicket = FormsAuthentication.Encrypt( ticket );
            return encTicket;
        }
</code></pre>

<p>Can you spot what i'm doing wrong?</p>