ASP.NET role management helps you to manage authorization, allowing you to specify which resources various users in your application are allowed to access. Role management lets you group users by assigning them to roles.
Questions tagged [asp.net-roles]
226 questions
2
votes
0 answers
How to collect membership, role, and profile data on registration ASP.NET MVC4
What is the best way to collect all relevant information user, role, and profile information on the registration page. My current approach is to set additional fields in the register model:
public class RegisterModel
{
[Required]
…

Xaxum
- 3,545
- 9
- 46
- 66
2
votes
1 answer
EF Code First and ASP.NET membership provider
I am building a web application using MVC 3. It has users with different roles and privileges. I am using EF Code First approach for database creation. My model class for user is:
public class Users
{
public int UserID { get; set; }
…

Sachin Kushwaha
- 33
- 4
1
vote
1 answer
how to make Roles and manage Users?
in my Project i need to define 3 roles :
SuperAdmin
Admin
RegisteredMembers
I also have Table which named "Users" that stores information such as:
fristName
lastName
Birthday
Username
Password
.
.
.
and etc
How can i make Roles recognize which…

Mr.B
- 63
- 2
- 9
1
vote
1 answer
Asp.net 4 MVC3 loose coupling roles and actions
for a project, I am making a mvc3 asp.net application. One of the features I would like to implement, is a loose coupled Role - Action attribution. Basically admin user should be a able to create roles and link them with actions.
The roles…

cecemel
- 616
- 2
- 7
- 22
1
vote
0 answers
Form authentication is logging me out
I am using form authentication for by application and when the form times-out the application logs the user out to login page.
But when I enter my credentials again, the application is not letting the user in. When I try it on another browser it…

Vin05
- 587
- 4
- 12
- 30
1
vote
1 answer
CheckBoxList ASP.Net MVC 3 from database
assumed that i have Roles table like this :
tb_role
RoleId Role_Name
1 SalesCreate
2 SalesEdit
3 AgentCreate
4 AgentEdit
i want to list role for Sales in checkbox (SalesCreate and SalesEdit, so its only have 2 checboxes). I…

ntep vodka
- 735
- 3
- 11
- 27
1
vote
1 answer
Retrieving data from classes that use TPH in entityframework
So I started my project using the identity scaffolding and created an application user class that inherits from identity user
using Microsoft.AspNetCore.Identity;
namespace test6.Models
{
public class ApplicationUser : IdentityUser
{
…

Adam
- 11
- 1
1
vote
2 answers
Restricted access for usercontrol by role
is possible to limit access for particular usercontrol for particular role?
I have page (default.aspx) that load (also) info.ascx
I wanto to restricted access to info.ascx and display a message like 'unauthorized' where he was to be loaded.
thanks!

maurox
- 1,254
- 1
- 19
- 33
1
vote
1 answer
.NET 6 MVC Application With MS Identity Platform (Azure) Integration Does Not Return Roles
I have created a boiler plate .NET 6 MVC web application and chosen the Azure AD Authentication type and connected it to my tenant and Azure application. The Azure application has roles set up.
In other applications when I check for…

Cef
- 661
- 1
- 6
- 26
1
vote
1 answer
Secure the web site according to the roles?
I use ELMAH locally and I wanna to use it in the production environment. When I search, I found the following:
Recall that in the ELMAH configuration's section we set the
allowRemoteAccess attribute to 0, which prohibits remote users from
…

Anyname Donotcare
- 11,113
- 66
- 219
- 392
1
vote
1 answer
Asp.Net Web Api JWT Authorization With Identity Always Getting 401
I'm using Asp.Net Core 5, and Asp.Net Identity with EFcore. I've followed parts of many video tutorials, advice posted here on SO and this very helpful article to get my project to the point where I'm at least getting 401's. My problem is now that I…

Ryan Callahan
- 115
- 1
- 11
1
vote
1 answer
C# Insert Query Parameter in MVC Insufficient Role Redirection
I have recently implemented Roles in MVC application. The controller has various action methods like below:
public class MyController : Controller
[Authorize(Roles = "User, SuperUser")]
public ActionResult DoActionOne() {
// This can…

SimpleGuy
- 2,764
- 5
- 28
- 45
1
vote
2 answers
Where in the ASP.NET pipeline does RoleProvider hook into?
The only place I know of that a RoleProvider gets used is when you use an Authorize attribute. Where else can I use a RoleProvider and does it get invoked anywhere other than places I might specifically reference roles (I'm thinking similar to how…

kenwarner
- 28,650
- 28
- 130
- 173
1
vote
0 answers
How do I use SSO (single sign on) With Roles
I have MVC web application that use roles in Authorization , Now i want to use SSO with it and other applications that may or may not use roles
I try simple implementation for SSO

hema vic
- 49
- 4
1
vote
2 answers
Asp.net WebForms Enable Roles
I've created a Webpage via Visual Studio 2017 using ASP.NET WebForms.
I'm using the build-in User Management and created some users.
Now I want to use the Role-Function.
First I've enabled the roleManager, but then I get a new error
"Could not find…

Seraphim
- 37
- 7