title: Asp.net Identity logout other user
body: <p>I'm usigin Asp.net Identity to authenticate user and I'm trying to lockout any user from admin side. But when I lockout any user who is online, It didn't logout. I have read many comments about my problem but all of them didn't work. I tried UserManager.UpdateSecurityStamp to logout user but it didn't work as well.
  How can I logout the user instantly when I lockout it ?</p>
  
  <pre><code>public ActionResult LockUser(string userId)
          {
              _userManager.SetLockoutEnabled(userId, true);
              _userManager.SetLockoutEndDate(userId,DateTime.Today.AddYears(999));
  
              var user = _userManager.FindById(userId);
              _userManager.UpdateSecurityStamp(userId);
  
              return RedirectToAction("UserDetail",new { userId });
          }
  
  
  app.UseCookieAuthentication(new CookieAuthenticationOptions
              {
                  AuthenticationMode = AuthenticationMode.Active,
                  AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
                  LoginPath = new PathString("/UnAuthorize/Index"),
                  Provider = new CookieAuthenticationProvider
                  {
  
                      OnValidateIdentity = SecurityStampValidator.OnValidateIdentity&lt;AppUserManager, User&gt;(
                          validateInterval: TimeSpan.FromMinutes(1),
                          regenerateIdentity: (manager, user) =&gt; user.GenerateUserIdentityAsync(manager))
                  }
              });
  </code></pre>