Using the generic type 'RoleManager<TRole, TKey>' requires 2 type arguments
<p>I'm getting 3 errors</p>

<blockquote>
  <p>Using the generics type 'RoleManager' TRole,TKey  requires 2 type
  arguments</p>
</blockquote>

<p>at following line of my Create method in asp.net mvc 5 web application</p>

<pre><code>ViewBag.RoleId = new SelectList(await RoleManager.Roles.ToListAsync("Name", "Name"));  

ViewBag.RoleId = new SelectList(RoleManager.Roles, "Name", "Name");
</code></pre>

<p>how to fix this </p>

<p>here the whole create method:  </p>

<pre><code>    // POST: /Account/Register
    [HttpPost]
    [AllowAnonymous]
    [ValidateAntiForgeryToken]
    public async Task&lt;ActionResult&gt; Register(RegisterViewModel model, HttpPostedFileBase upload, params string[] selectedRoles)
    {

    try
    {
        if (ModelState.IsValid)
        {
            var user = new ApplicationUser { UserName = model.UserName, Email = model.Email };                      


            var result = await UserManager.CreateAsync(user, model.Password);

            if (result.Succeeded)
            {
                //Add User to the selected Roles 
                if (selectedRoles != null)
                {
                    var addroles = await UserManager.AddToRolesAsync(user.Id, selectedRoles);
                    if (!addroles.Succeeded)
                    {
                        ModelState.AddModelError("", result.Errors.First());
                        ViewBag.RoleId = new SelectList(await RoleManager.Roles.ToListAsync("Name", "Name"));
                        return View();
                    }
                }

            }

            else
            {
                ModelState.AddModelError("", result.Errors.First());
                ViewBag.RoleId = new SelectList(RoleManager.Roles, "Name", "Name");
                return View();
            }

            return RedirectToAction("Index");
            // AddErrors(result);
        }

    }

    // If we got this far, something failed, redisplay form
    catch (RetryLimitExceededException /* dex */)
    {
        //Log the error (uncomment dex variable name and add a line here to write a log.
        ModelState.AddModelError("", "Unable to save changes. Try again, and if the problem persists see your system administrator.");
    }

    ViewBag.RoleId = new SelectList(RoleManager.Roles, "Name", "Name");

    return View(model);
}
</code></pre>