title: Why signinmanager.passwordsigninasync method return failure all time in MVC5
body: <p>Here is my <code>Login</code> method:</p>
  
  <pre><code>[HttpPost]
  [AllowAnonymous]
  [ValidateAntiForgeryToken]
  public async Task&lt;ActionResult&gt; Login(LoginViewModel model, string returnUrl)
  {
     if (!ModelState.IsValid)
     {
         return View(model);
     }
     //This doesn't count login failures towards account lockout
      //To enable password failures to trigger account lockout, change to shouldLockout: true
     var result = await SignInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, shouldLockout: false);
     switch (result)
     {
         case SignInStatus.Success:
             return RedirectToLocal(returnUrl);
         case SignInStatus.LockedOut:
             return View("Lockout");
         case SignInStatus.RequiresVerification:
             return RedirectToAction("SendCode", new { ReturnUrl = returnUrl, RememberMe = model.RememberMe });
         case SignInStatus.Failure:
         default:
             ModelState.AddModelError("", "Invalid login attempt.");
             return View(model);
     }
  }
  </code></pre>
  
  <p>Here is my Authorize filter:</p>
  
  <pre><code>protected override bool AuthorizeCore(HttpContextBase httpContext)
  {
      var userEmailId = httpContext.Session["userName"];
      bool authorize = false;
      foreach (var role in allowedroles)
      {
          /* getting user form current context */
          var user = context.employees.Where(m =&gt; m.emailId == userEmailId  &amp;&amp; m.Role == role);
          if (user.Count() &gt; 0)
          {
              authorize = true; /* return true if Entity has current user(active) with specific role */
          }
      }
      return authorize;
  }
  </code></pre>
  
  <p>Here is my action method:</p>
  
  <pre><code>[AuthAttribute]
  [CustomAuthorize("Admin", "SuperAdmin")]
  public ActionResult GetEmployeeList(string sortOrder, string currentFilter, string searchString, int? page)
  {
      return View(db.GetListviewData().ToList());
  }
  </code></pre>
  
  <p>I have try to used the authorize filter to check the user role from the database but when I try to login in my application <code>SignInManager.PasswordSignInAsync</code> method returns failure every time.</p>
  
  <p>Please help me, thanks in advance</p>