Questions tagged [role-manager]
43 questions
0
votes
1 answer
Provide role for user in Azure Active Directory
I am new to Azure integration with web app. Can I know is there any tutorial available to assign role to user that login with Azure AD? Such as UserManager.AddToRole(userId, "Admin") for a standard login. I need a full guide on how to assign role to…

Chuah Cheng Jun
- 243
- 1
- 3
- 17
0
votes
1 answer
Using the generic type 'RoleManager' requires 2 type arguments
I'm getting 3 errors
Using the generics type 'RoleManager' TRole,TKey requires 2 type
arguments
at following line of my Create method in asp.net mvc 5 web application
ViewBag.RoleId = new SelectList(await RoleManager.Roles.ToListAsync("Name",…

kez
- 2,273
- 9
- 64
- 123
0
votes
0 answers
Create Users and Roles in ASP.NET 6 & Entity Framework 7
I need to create users and roles at the first startup of my web application. For that, I write my code into the Configure() function in Startup.cs.
When I run my application, I get this error:
An exception of type 'System.AggregateException'…

Y.Berthoud
- 75
- 8
0
votes
1 answer
MVC5 to MVC6 converstion can't get RoleManager to work
I am trying to upgrade an MVC 5 application to MVC 6. The only thing in the 5 application is the ability to administrate Users and Roles. It is a "template" we created at work to wrap around all MVC projects to give them all the "login, register,…

JustJohn
- 1,362
- 2
- 22
- 44
0
votes
1 answer
MemberShip Create Role
Additional information:
An error occurred while attempting to initialize a
System.Data.SqlClient.SqlConnection object. The value that was
provided for the connection string may be wrong, or it may contain an
invalid syntax.
I'm creation new…

shujaat ali
- 29
- 1
- 9
0
votes
2 answers
Web Forms Windows Authentication w/ Remote SQL Database
I have a ASP.NET 4.0 web application that uses Windows Authentication against AD and a SQL Server for Role management.
Basically, I want all users who have an AD account to be able to access the application, but I want to further secure the app…

user2242661
- 55
- 9
0
votes
1 answer
Retrieving all roles from RoleManager throws exception asp.net identity
When I try to get roles from RoleManager, I get list of very strange list of objects,
How I retrieve my roles:
public AppRoleManager RoleManager
{
get
{
return HttpContext.Current.GetOwinContext().GetUserManager();
…

Jon Koivula
- 899
- 1
- 11
- 24
0
votes
1 answer
User Not Found when using AddUserToRole
I'm trying to assign user to a role in asp.net membership.
protected void btnAssignUser_Click(object sender, EventArgs e)
{
Roles.AddUserToRole("Upendra", "Admin");
}
but I'm keep getting the error below.
The user…

Upendra
- 61
- 7
0
votes
1 answer
Enable Role Manager in my Asp.net MVC4 web application
How can i enable the Role Manager in my MVC4 application ?
I need to add roles to my application users, and i need a summary on how to do it correctly.

Nada N. Hantouli
- 1,310
- 1
- 12
- 20
0
votes
0 answers
Access roles in nested group
I want to see if the current user is in the group "B_Group" (which this Group is in the Group "A_Group").
I used the code below:
if(Roles.IsUserInRole(@"A_Group\B_Group"))
but it does not find the user and returns false. also when I enumerate the…

abdolahS
- 663
- 12
- 35
0
votes
1 answer
The new Asp.net Identity MVC 5 , can my old asp.net mvc 4 code still work
I have created a full module for managing Roles & Users inside asp.net mvc 4, for example the following action method will create a new Role:-
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult CreateRole(MyRole mr)
…

John John
- 1
- 72
- 238
- 501
0
votes
1 answer
The Role Manager feature has not been enabled using Partial views
I am currently trying to do the dynamic _Layout by reading the role that user currently logged is in adn i am having this error constantly.
Additional information: The Role Manager feature has not been enabled.
I know that it is because the…

Łukasz Trzewik
- 1,165
- 2
- 11
- 26
0
votes
1 answer
Client Server Communication via REST API
I am working in application have iOS native application as front end and c# .net as back-end.
Currently I am using WCF REST API for any communication between iOS client and server.
In my application there hare two types of user "Administrator" and…

vishal savsani
- 1
- 1