Skip to content

Error When Declaring roleManager #5

Description

I currently had this for defining the roleManager:
var roleManager = new RoleManager<ApplicationRole>(new RoleStore<ApplicationRole>(context));

Your code says to use this:
var roleManager = HttpContext.Current.GetOwinContext().Get<ApplicationRoleManager>();

I'm getting an error for the ApplicationRoleManager saying this:
There is no argument given that corresponds to the required formal parameter 'key' of 'IOwinContect.Get(string)'

All of my other code is the same. Do you know what the issue could be? I have defined the ApplicationRoleManager exactly like your code.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions