title: How to create SecurityStamp for AspNetUser in ASP .NET MVC 5
body: <p>When I create user by Register action whe  application is running the application user gets SecurityStamp. When I add user by:</p>
  
  <pre><code>if (!context.Users.Any()) {
                  System.Diagnostics.Debug.WriteLine("INSIDE");
                  var hasher = new PasswordHasher();
                  try {
                      var users = new List&lt;ApplicationUser&gt; { 
                          new ApplicationUser{PasswordHash = hasher.HashPassword("TestPass44!"), Email = "informatyka4444@wp.pl", UserName = "informatyka4444@wp.pl"},
                          new ApplicationUser{PasswordHash = hasher.HashPassword("TestPass44!"), Email = "informatyka4445@wp.pl", UserName = "informatyka4445@wp.pl"}
                          };
  
                      users.ForEach(user =&gt; context.Users.AddOrUpdate(user));
  
                      context.SaveChanges();
                  } catch (DbEntityValidationException e) {
                      System.Diagnostics.Debug.WriteLine("EXC: ");
                      foreach (DbEntityValidationResult result in e.EntityValidationErrors) {
                          foreach (DbValidationError error in result.ValidationErrors) {
                              System.Diagnostics.Debug.WriteLine(error.ErrorMessage);
                          }
                      }
  
                  }
              }
  </code></pre>
  
  <p>user doesn't get security stamp:</p>
  
  <p><img src="https://i.stack.imgur.com/Mnzow.png" alt="enter image description here"></p>
  
  <p>and then when I want to login I get:</p>
  
  <p><img src="https://i.stack.imgur.com/ESRco.png" alt="enter image description here"></p>
  
  <p><strong>Question:</strong> How to generate <code>SecurityStamp</code> for user?</p>