title: How ASP.NET MVC SignInManager works?
body: <p>I have written a code which is similar to automatically generated by using Individual User Account authentication mode in ASP.NET MVC. When I run it, I don't get any exceptions but when I then check this.User, the name property is null, not "Test". When I run automatically generated code, the name is always  changed. Why my code does not change this.User?</p>
  
  <pre><code>public ActionResult Index()
  {
      var dbContext = new IdentityDbContext&lt;IdentityUser&gt;("DefaultConnection");
      dbContext.Database.CreateIfNotExists();
  
      var userStore = new UserStore&lt;IdentityUser&gt;(dbContext);
      var userManager = new UserManager&lt;IdentityUser, string&gt;(userStore);
      var result = userManager.Create(new IdentityUser { Id = Guid.NewGuid().ToString(), UserName = "Test" });
  
      var signInManager = new SignInManager&lt;IdentityUser, string&gt;
           (userManager, System.Web.HttpContext.Current.GetOwinContext().Authentication);
  
      var toSign = userManager.FindByName("Test");
      signInManager.SignIn(toSign, true, true);
  
      return View();
  }
  </code></pre>