Questions tagged [role-manager]
43 questions
6
votes
2 answers
Authorization/Roles in MVC5
I'm having trouble using authorization/roles in MVC5 (VS2013).
Authentication works pretty much out of the box (that's to say just by using Visual Studio to create the default MVC project). I change the DefaultConnection connection string to a valid…

Jasper Kent
- 3,546
- 15
- 21
5
votes
1 answer
ASP.NET Core Identity userManager.AddToRoleAsync() - add by id
I have a custom user role class with CompanyId as a foreign key. So I could create user roles relative to the company. That means Administrator role or any other role per se, can be in multiple companies. I cannot go for a many-to-many relationship…

Mohamed Salman
- 141
- 10
4
votes
1 answer
Configuring roleManager provider with MVC Error
I always get an error when running my MVC Project since I put
this code on my web.config file.

Anaiah
- 633
- 7
- 20
2
votes
0 answers
Android RoleManager, How to handle “Don't ask again” in while requesting?
In Google documention there is no any information about, how to handle if user click “Don't ask again”. So if user click on it, in next time the app will not open a dialog for user. And in onActivityResult it returns just RESULT_CANCELED

MLDZ
- 166
- 1
- 6
2
votes
1 answer
Android RoleManager remove role RoleManager.ROLE_SMS for own package
I have sms backup app that backup and restore SMS only
so when i restore sms I need to set default Massage App. then after Restore i don't need to stay default Massage App.
So my question is how to remove my app default to Massage App.
and also for…

sk panchal
- 159
- 1
- 13
2
votes
1 answer
ASP.NET Identity Role already exits
I am building a Multi-tenant application. For this reason I have added a column named OwnerId (Owner of the Role). I have been having some trouble adding a Role to AspNetRoles table using ASP.NET Identity.
I have a custom RoleValidator that…

chrisdyck
- 27
- 1
- 8
2
votes
2 answers
Get the list of Roles in ASP.NET MVC
I have following methods to get the list of roles stored in AspNetRoles
[AllowAnonymous]
public async Task Register()
{
//Get the list of Roles
ViewBag.RoleId = new SelectList(await…

kez
- 2,273
- 9
- 64
- 123
2
votes
0 answers
RoleManager MVC5/EF6
I started a MVC5 project with Individual User Accounts, I ran the initial migrations to get the database in place for users, roles et cetera.
I wrote a RolesController in an Admin Area, but from there, I am stuck. The first error was telling me to…

Johann Behrens
- 53
- 4
2
votes
1 answer
Generate admin pages for MVC SqlRoleManager
I want to add admin MVC pages for maintaining users and roles for users for the SqlRoleManager. Is there a template or generator available or do I need to build it from scratch?

Greg Finzer
- 6,714
- 21
- 80
- 125
1
vote
0 answers
Error: Asp.net Mvc Identity RoleManager Null
I got a error for add role in my project. please any one help me.
Identity Config File (Role Manager)
public class ApplicationRoleManager : RoleManager
{
public ApplicationRoleManager(IRoleStore…

Mmb shawon
- 11
- 1
1
vote
1 answer
ASP.NET Core Identity 3.1: UserManager.RemoveFromRoleAsync always returns UserNotInRole
Im able to create roles using role manager and add user to a role using UserManager.AddToRoleAsync
But when using method UserManager.RemoveFromRoleAsync(User, Role), im always getting error saying UserNotInRole
But when using…

sthashakun
- 50
- 8
1
vote
1 answer
Missed User property, for counting number of user/roles in asp.net core identity
Scenario:
I have an Asp.net core program that using identity authentication.
Goal:
I want to get number of users that have specific role like this:
private readonly UserManager _userManager;
private readonly…

Hassan Hosseini
- 410
- 1
- 4
- 20
1
vote
1 answer
In ASP.NET core 3.0, I get the following exception when I apply the Except() method
InvalidOperationException: Processing of the LINQ expression 'Except
I am using the Identity system in ASP.NET core 3.0 to make a website. I have a list of users, some of whom are assigned to roles. Basically, I am trying to get a list of users who…

Sea_Ocean
- 309
- 3
- 8
1
vote
0 answers
IsUserInRole doesn't execute in my CustomRoleProvider
I'm using Form authentication in my mvc project.
I've created a CustomRoleProvider and implement two method:
IsUserInRole and GetRolesForUser
Web.config
…

Majid Basirati
- 2,665
- 3
- 24
- 46
1
vote
1 answer
Role Manager UI ASP.NET CORE Identity & EF
I've created an small fleet management app and with the help of tutorials and materials I've found on the Microsoft website and other.
I managed to implement the User Management services (did not create the project with Authentication from the…

Stefan
- 33
- 8