title: Forms Authentication Across Applications has no cookie
body: <p>I have two applications. The first one is an ASP.NET 4 MVC application that requires authentication. The second is an app that will handle the authentication and set the forms authentication cookie.</p>
  
  <p>On the authorizing app, I call</p>
  
  <pre><code>FormsAuthentication.SetAuthCookie(username, false);
  </code></pre>
  
  <p>and then I do a simple Response.Redirect back to my MVC application.</p>
  
  <p>In the MVC app, I am making a custom filter that inherits from AuthorizeFilter. On the OnAuthorization method, I was going to decrypt the cookie and grab some additional user data from the authorized user.</p>
  
  <p>My problem is, that </p>
  
  <pre><code>HttpContext.Current.Request.Cookies
  </code></pre>
  
  <p>has nothing in it. I have checked out fiddler, and the authentication app correctly sets the cookie, and the MVC application gets the cookie, but when it gets to my filter, there is nothing there.</p>
  
  <p>My web.config has in both applications has the exact same setup:</p>
  
  <pre><code>      &lt;forms
      name=".ASPXFORMSAUTH"
      protection="All"
      path="/"
      timeout="30"
      enableCrossAppRedirects="true"
      domain="localhost"/&gt;
  </code></pre>
  
  <p>And I have setup both with the same machineKey to be able to decrypt the cookie. The problem is, I am not seeing any cookie in my OnAuthorization method within my MVC filter.</p>
  
  <p>Right now both applications are running on my local IIS instance. </p>