title: Single Sign On with Forms Authentication
body: <p>I am trying to set up Single sign on for 2 websites that reside on the same domain</p>
  
  <p>e.g.</p>
  
  <p><a href="http://mydomain" rel="noreferrer">http://mydomain</a> (top level site that contains a forms-auth login page)</p>
  
  <p><a href="http://mydomain/admin" rel="noreferrer">http://mydomain/admin</a> (seperately developed website residing in a Virtual Application within the parent website)</p>
  
  <p>Have read a few articles on Single Sign on
  e.g.</p>
  
  <p><a href="http://www.codeproject.com/KB/aspnet/SingleSignon.aspx" rel="noreferrer">http://www.codeproject.com/KB/aspnet/SingleSignon.aspx</a> </p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/dd577079.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/dd577079.aspx</a></p>
  
  <p>And they seem to suggest it is just a case of having the same machinekey section in each web.config so that the cookie encryption and decryption is the same for each application</p>
  
  <p>I have set this up and I never get prompted for credentials in the sub-website (the virtual application)</p>
  
  <p>I always get prompted in the parent site.</p>
  
  <p>In addition to having the same machinekey I've also tried adding the same <code>&lt;authentication&gt;</code> and <code>&lt;authorisation&gt;</code> elements</p>
  
  <p>Any idea what I could be missing?</p>