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
0
votes
1 answer
Re-Route based on Role
I believe this is fairly simple. I have a small site for database management for a customer. When the user logs in, I want to reroute them to either the admin screen or to the user screen, based on their role. Currently it sends them to the Home…

Jonesopolis
- 25,034
- 12
- 68
- 112
0
votes
1 answer
how to disabled (grayed out) the edit button in mvc?
how to I disabled or grayout the edit or save button based on the user priviliges or the roles in mvc4 applications using razor syntax. user will see the button and not able to click or selecting the button in MVC4. how to check the validations in…

kalimuthu
- 139
- 3
- 11
0
votes
3 answers
ASP.NET MVC Roles and Security
Assume like this is my SampleController action method
public ActionResult AdminView()
{
return View()
}
If want this controller method to be called if the logged in user belongs to admin role, otherwise this method call should be blocked and…

SARAVAN
- 14,571
- 16
- 49
- 70
0
votes
1 answer
ASP.NET Membership and Roles
I am trying to use ASP.NET membership and roles for my project and have been going through different articles, posts and SO to check if using it is a better option for me rather than hand coding the whole functionality from scratch. Yet after days…

ZedBee
- 2,320
- 7
- 39
- 61
0
votes
2 answers
ASP.NET MVC 4 Roles
what is the best way to manage roles in MVC 4? I found this tutorial:
http://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-7
but I want to be flexible and add the back office user the power to create and assing roles to registred…

Davide
- 1,305
- 3
- 16
- 36
0
votes
1 answer
filter linq query based on role of logged in user MVC3 Controller
What I am trying to do is filter a query based on the role of the logged in user in my MVC3 Controller. I am restricting users to have only one role; no user can have more than one role. I have some code snippets but I am not sure this is the…

Diin
- 565
- 11
- 41
0
votes
1 answer
Adding users to roles fails
I have been working on a website for some time now.
I am using the membership, role and profile providers which are working correctly.
I have a standard createuserwizard control where a user can register. When a user registers, I want to add him to…

DerpyNerd
- 4,743
- 7
- 41
- 92
0
votes
1 answer
Adding users to roles on registring failed ASP.NET MVC3
I like to enable users to choose their role on register in asp.net mvc web application. I have previous add roles via asp.net addministration tool. Here is the code I am using in register methods
public ActionResult Register() …

vikifor
- 3,426
- 4
- 45
- 75
0
votes
1 answer
ASP.NET Web.Sitemap - one role not being displayed in nav menu while others are
I'm working on an ASP.NET C# application that has three roles defined for various user levels within the application: "User", "Manager", and "Admin". I've completed most of the User and Admin stuff, and just added a page to the Manager section. But…

timbck2
- 1,036
- 3
- 15
- 36
0
votes
2 answers
On live server how can i create aspnet_roles
I posted my asp.net website on MVC3 live on godaddy server. How can i create admin role and add users to it? Is there an easy way to do this? Even if through sqlserver please respond with some level of code to understand better. Thanks!

NoviceMe
- 3,126
- 11
- 57
- 117
0
votes
2 answers
NullReferenceException in System.Web.Security.RoleManagerModule.OnEnter()
I have encountered an error for which I can find no answer online.
I created a new virtual Server 2008 R2 Standard box with the IIS role and ASP.NET role services. The server is destined for production. I copied a website to the server and it has…

Norm
- 1
- 1
0
votes
2 answers
is there a better way to implement role based acton and view in mvc than if/else?
So I have three roles, administrators, companies and employees in my mvc .net application that uses asp.net membership in a separate database. I moved the .net membership in a different database for now because everytime I modify the model, the .net…

Thupten
- 2,158
- 1
- 24
- 31
0
votes
1 answer
WCF Windows authentication with AspNetRoles
Is it possible to configure WCF to use Windows credentials to authenticate users and the SQL AspNet Roles provider to store roles and authorizations?

Omtara
- 2,911
- 2
- 19
- 31
0
votes
1 answer
Authorization based on user's class (role/member) with mysql
I used to edit Web.config before in order to allow some users to access some pages/folder, eg:

etuardu
- 5,066
- 3
- 46
- 58
-2
votes
1 answer
How can I add roles in mvc 5?
How can I add roles in a empty mvc 5 project?
I searched on google but I don't found a tutorial for an empty project.
Can someone give me a link to a tutorial or help me here ?

Ursaciuc Adrian
- 37
- 1
- 2
- 10