Reputation: 17
I implemented membership in asp.net, I have a manager that can define users, users have USER role, when I use below code to assign role, it does not work:
Roles.AddUserToRole(txtUsername.Text, "USER");
Now my question is: What is the reasons?
when I log in and check its roles, there is no role. I use this code for detect role:
string[] role = Roles.GetRolesForUser(txtUserName.Text);
Upvotes: 0
Views: 1803
Reputation: 94643
From MSDN doc:
Upvotes: 3