title: Sharing authentication between parent and child web applications
body: <p>We have two separate MVC 4 Web Applications that run as parts of the same website. The main (parent) project has authentication, and it works fine. Now that we've added the second project to the same site (one page that runs in a child frame), we can't figure out how to make it use the authorization that the user has undergone through the parent application.</p>
  
  <p>Both use the same forms element in web.config:</p>
  
  <pre><code>&lt;forms loginUrl="~/Account/LogOn" name=".ASPXFORMSAUTH"  domain="..." protection="All" timeout="2880"/&gt;
  </code></pre>
  
  <p>Do I need more than an [Authorize]-tag in the child project?</p>
  
  <pre><code>[Authorize]
  public class HomeController : Controller
  {
      ...
  
      public ActionResult Index()
      {
  
          return View();
      }
  
      ...
  }
  </code></pre>
  
  <p>Probably needless to say, the page is redirected to the logon-page if i try to access the child project's HomeController, even though a user is logged in in the parent project.</p>
  
  <p>Both projects use the same machineKey.</p>
  
  <p>Any ideas?</p>