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
1
vote
0 answers
asp.net mvc multitenant (multiple projects management like structure)
I am looking for right word but I believe it has to be in direction of asp net multitenancy.
I dont need full multitenant site but I would like to design a site where managers of different divisions can log in. These managers are like admins in…

tim
- 11
- 2
1
vote
1 answer
How to change Context.User after changing the role of the user
I am working on the process of creating and vetting new users. After a user has registered, they are sent a link -containing a query string with a token- to their email so they can verify their email address. When a user clicks the link, they are…

KRob
- 389
- 3
- 19
1
vote
2 answers
How can I display an Identity User's roles?
I want to adjust the _LoginPartial.cshtml to display:
Logged in as () | Logoff
So I wish to add the first role name associated with the logged in user.
I can't access it via the user object, so how do I access this…

Fred Fickleberry III
- 2,439
- 4
- 34
- 50
1
vote
0 answers
Why is my Application trying to create a local SQL Server Express database when I add a user to a role?
I am running the code locally, and I have a database setup on a 3-rd party SQL Server and it has 5 tables for UserProfiles/Roles/Membership. I am trying to simply add a user to a role.
Below is my code for that simple exchange:
namespace…

schumacherj
- 1,284
- 5
- 18
- 33
1
vote
1 answer
Which dll i should import to use RoleProvider
I want my role provider class inherit from RoleProvider. But which dll i must add dont know. I coulnt find anything about this issue except RoleProvider namespace has been changed in framework 4.

ftdeveloper
- 1,053
- 3
- 26
- 50
1
vote
0 answers
The type or namespace name 'RoleExists' does not exist in the namespace (are you missing an assembly reference?)
I'm trying to add roles programatically using Sql Membership Provider, like show below:
string newRoleName = RoleName.Text.Trim();
if (!Roles.RoleExists(newRoleName))
{
// Create the role
…

gvd
- 1,482
- 6
- 32
- 58
1
vote
0 answers
How create my Custom Authorize Attribute for my MVC 4 application?
May be there are many dublicates of this question. But I ignored default membership of MVC and use my custom login with cookies. That is why can not create Custom Authorize Attribute like in samples.
I have User model like this:
public class…

Jeyhun Rahimov
- 3,769
- 6
- 47
- 90
1
vote
1 answer
ASP.NET Membership, access denied to all roles
I have a problem with asp.net membership authorization, I configured my main web config like this:

djedjica
- 115
- 10
1
vote
0 answers
Grouping roles in Membership provider in ASP.NET
I have already asked similar question before
I have basic user Roles:
-Admin
-Super User
-User
For this roles I manage site permission. Like adding new users or changing their profiles.
Also i have bunch of pages in my app, like
-Evaluation.aspx…

makambi
- 769
- 1
- 13
- 22
1
vote
1 answer
how can access folder's pages according to roles in c# vs2005 in webconfig
The scenario is :
I am working on role based project in vs2005 and sql server2005.
I defined the role in database and added custom role provider. I have two roles like "admin" and "user". I created two folder in project and placed the pages in these…

Ghost Answer
- 1,458
- 1
- 17
- 41
1
vote
2 answers
Administration Tool stopped creating ASPNETDB in APP_DATA
I have a database hosted on somee.com and I use it for my Membership, Roles and other information tables.
However, by now I only experienced minor troubles with ASPNETDB.mdf that is automatically generated by the ASP.NET Web Administration tool, so…

Kfir Eichenblat
- 449
- 2
- 8
- 27
1
vote
3 answers
Additional layer to ASP.NET roles
Currently a User could be an administrator, a janitor, a teacher etc.. We currently are using the default providers.
Soon there should be multiple clubs. All the roles will be the same and available in all the clubs. Users could be in multiple clubs…

Philippe
- 1,715
- 4
- 25
- 49
1
vote
1 answer
How to assign users the security roles associated with Active Directory
I have a different access role for each of the pages in my application (using Windows Authentication) to restrict users from access, using SqlRoleProvider. So to add users to role, I would go,
Roles.AddUserToRole(userName, roleName);
Now, I need…

viv_acious
- 2,429
- 9
- 34
- 55
1
vote
2 answers
MVC3 Manage all users in a specific role and additional information
I am building the admin side of the project at the moment where I will have to :
- create new users and add some more specific information about them (i.e. location, position etc.)
- different users will have to be assigned to different roles,
What…

Observer
- 11
- 2
1
vote
2 answers
Roles.GetRolesForUser(); does not seem to work in MVC 4
I'm trying to create a new MVC 4 internet site using the internet template provided in VS2012. I am able to register users for the site and successfully log in and log out. I can see that the SimpleMembership has created 5 tables (UserProfile,…

Bindi
- 41
- 1
- 6