title: Why do ASP.NET Identity logins from one site get shared with different websites on the same machine?
body: <p>I create a brand new web application say "WebApplication1" - WebForms with Authentication set to Individual User Account. I don't add a single line of code to the auto generated code template. I run the application and register a user "User1" and log in - works fine.</p>
  
  <p>Now I create another web application "WebApplication2" - same WebForms with  Authentication set to Individual User Account. Again no code and I run the application. Now I create another user say "User2" - works fine.</p>
  
  <p>The problem starts when both the applications are running at the same time.
  If I log in to the first site as "User1" this automatically sets the Context.User.Identity of the second site from "webApplication2" as "User1" when it does not even have "User1" registered and vice verse and if I log out from one site the other gets logged out. </p>
  
  <p>How is it that Context.User.Identity is being shared?</p>
  
  <p>The code is just the same - </p>
  
  <pre><code>public static void SignIn(UserManager manager, ApplicationUser user, bool isPersistent){  
  
        IAuthenticationManager authenticationManager = HttpContext.Current.GetOwinContext().Authentication;
          authenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie);
  
          var identity = manager.CreateIdentity(user, DefaultAuthenticationTypes.ApplicationCookie);
          authenticationManager.SignIn(new AuthenticationProperties() { IsPersistent = isPersistent }, identity);
      }
  </code></pre>
  
  <p>I sure am missing some basic knowledge on how ASP.Net Identity works so please help me out.</p>
  
  <p>Thanks in advance.</p>