Questions tagged [roleprovider]

Built-in and custom implementations of ASP.NET's Role Provider, as part of Membership functionality in the System.Web.Security namespace.

ASP.NET supports user authentication and authorization through a provider-based model. In support of the authorization providers, there is a Role Provider which supports filtered access to resources by checks against pre-assigned roles.

MSDN Documentation

Managing Authorization Using Roles

Understanding Role Management

Role Management Providers

ASP.NET Security

Questions for this Tag

Questions that should have this tag pertain to use of the default ASP.NET Role Providers (AspNetSqlRoleProvider & AspNetWindowsTokenRoleProvider), as well as questions about extending/overriding the built-in provider.

386 questions
0
votes
2 answers

ASP.NET Role, RolePrivider, ASP.net sql server setup wizard

I am using asp.net forms authentication, membership provider and role provider. You can refer to this post. This post helped me to restrict access of the users to the specific areas of Web application according to their roles. But the roles are…
user366312
  • 16,949
  • 65
  • 235
  • 452
0
votes
1 answer

asp.net's Obscure Role Provider

Plz refer to this previous post of mine. I have studied asp.net's membership provider. Now I need to study how to use asp.net's Role Provider facility in combination with Forms Authentication. I did study MSDN's Role Provider topic. It was not…
user366312
  • 16,949
  • 65
  • 235
  • 452
0
votes
1 answer

asp.net mvc, multiple CustomAuthorize Role Providers

I am trying to lock my application down to each method where by users and admin can see the whole controller but only administrators can create, delete, and edit. I have created a CustomAuthorize class which holds the method: public class…
Steven
  • 91
  • 1
  • 9
0
votes
1 answer

Custom RoleProvider in a MultiTenant MVC App

I need to develop a custom RoleProvider for a MultiTenant web app. At the DB level, we have a table that relates Users with Roles with Tenants. My problem is that RoleProvider gets user roles just passing the User as parameter, and we need to take…
Romias
  • 13,783
  • 7
  • 56
  • 85
0
votes
1 answer

Own rolemanager provider without aspnetdb.mdf

I'm using rolemanager and security trimming for my menu. Since my server isnt too friendy about this ASPNETDB.mdf, I've created an own rolemanager in xml and c# class. But Visual studio is still creating my ASPNETDB file in APP_DATA. Now I've…
Ruben Ravnå
  • 659
  • 7
  • 17
0
votes
1 answer

Implemeting CustomRoleProvider and use the role for the authorisation in MVC3 asp.net

I've been learning how to implement CustomRoleProvider from a few tutorials and managed to implement 2 main methods as below public override string[] GetRolesForUser(string userName) { string connectionString = …
Best
  • 2,200
  • 9
  • 30
  • 49
0
votes
2 answers

Can I just implement RoleProvider without MembershipProvider?

I am developing an intranet application with Windows Authentication, I have implemented a custom role provider and tied that in with my repository which has Users and Roles. I use [Authorize(Role="Administrator")] on my controller class. I am logged…
Seth
  • 8,213
  • 14
  • 71
  • 103
0
votes
3 answers

Length of the cookie text for caching RolePrincipal is always larger than 4096

I tried implementation ASP.NET role-based authorization for my project, but I never found cookie is saved in client browser. I tried some testing code like, RolePrincipal rolePrincipal = new RolePrincipal(new GenericIdentity("a")); string text1 =…
0
votes
1 answer

Inherit or override controller to check user role

I have function which return true or false depend of UserID and User Role. I have controller with several action results. for example public class DemoController : Controller { public ActionResult Index(){} public ActionResult…
Novkovski Stevo Bato
  • 1,013
  • 1
  • 23
  • 56
0
votes
1 answer
0
votes
1 answer

Shared Authentication between applications

I am trying to share authentication and authorization between different web applications (asp.net application and a MVC4 Application). I read that you should set the machine key and those values to be the same between the sites. I have done this and…
Captain0
  • 2,583
  • 2
  • 28
  • 44
0
votes
1 answer

Role based navigation in Razor

We are creating a back end admin system and want to allow users in roles such as finance and membership to have access to certain areas. Ideally we would like to show only areas that you have access to in the navigation. Using umbraco 4.7+ and…
chris vdp
  • 2,842
  • 2
  • 22
  • 35
0
votes
2 answers

Set a group of actions to require the same authorization

Is there a way to set a group of actions inside of a controller to require the user to be in a certain role? So for example if I have 5 Actions that I want to require the user to be in a "Recruiting" role can I group the code and then have all those…
Jared
  • 5,840
  • 5
  • 49
  • 83
0
votes
2 answers

WCF: Custom RoleProvider with PrincipalPermissions: Doesn't appear to get hit / how to debug it?

I have a custom role provider that inherits off RoleProvider. In the web app this works fine with no problems. However I am also using it in the WCF service and am having great problems stepping into it. to the extent that I suspect it isn't being…
John Nicholas
  • 4,778
  • 4
  • 31
  • 50
0
votes
1 answer

Repository Doesn't Get Injected from HttpContext.Current.User.IsInRole

I have an MVC app with custom membership and role providers. I am checking whether a user is in a role like this: public static bool CustomersVisible { get { return HttpContext.Current.User != null && …
1 2 3
25
26