Identity error: Value cannot be null.\r\nParameter name: manager
<p>I using ASP.NET Identity and when a user want to register get this error:</p>

<blockquote>
  <p>Value cannot be null.\r\nParameter name: manager.</p>
</blockquote>

<p>Here is my Register Action code:</p>

<pre><code>public virtual ActionResult Register(string nm, string em, string ps)
    {
        var redirectUrlPanel = new UrlHelper(Request.RequestContext).Action("Index", "HomeUsers", new { area = "Users" });
        var redirectUrlAuction = new UrlHelper(Request.RequestContext).Action("Auction", "Default", new { area = "" });

        if (ModelState.IsValid)
        {
            try
            {
                var user = new Q_Users();
                user.UserName = nm;
                user.Email = em;
                user.SecurityStamp = Guid.NewGuid().ToString();

                var adminresult = UserManager.Create(user, ps);

                //Add User Admin to Role Admin
                if (adminresult.Succeeded)
                {
                    //Find Role Admin
                    var role = RoleManager.FindByName("Admin");
                    var result = UserManager.AddToRole(user.Id, role.Name);
                    if (result.Succeeded)
                    {
                        return Json(new { OK = "1", UrlPanel = redirectUrlPanel, UrlAuction = redirectUrlAuction });
                    }
                }
                else
                {
                    return Json(new { OK = "0", UrlPanel = redirectUrlPanel, UrlAuction = redirectUrlAuction });
                }
            }
            catch (Exception ex) { }
            return Json(new { OK = "0", UrlPanel = redirectUrlPanel, UrlAuction = redirectUrlAuction });
        }
        else
        {
            return Json(new { OK = "0", UrlPanel = redirectUrlPanel, UrlAuction = redirectUrlAuction });
        }
    }
</code></pre>

<p>And the error in this Line: <code>var adminresult = UserManager.Create(user, ps);</code></p>