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
0 answers

ASP.NET MVC 4 custom role provider refresh

I am programming an application that uses custom membership provider. In my custom roleprovider web.config file I have:
jstuardo
  • 3,901
  • 14
  • 61
  • 136
0
votes
2 answers

MVC4 : adding roles in database

I have a project called Authorization with CodeFirstRoleProvider class that inherits from default RoleProvider public class CodeFirstRoleProvider : RoleProvider { public override void CreateRole(string roleName) { …
Cybercop
  • 8,475
  • 21
  • 75
  • 135
0
votes
1 answer

add users to that role doesnt work

I have a test method that is testing if users get added to a role. But my add users to that role doesnt work. Can someone explain what Im doing wrong? public override void AddUsersToRoles(string[] usernames, string[] roleNames) { try …
user216672
  • 151
  • 3
  • 5
  • 14
0
votes
2 answers

Advanced .NET Membership/Role Provider

I'm in need of a RoleProvider with the following functionality: Dynamic Assignment of Roles to Tasks Authentication / Authorizaiton of IPrincipals based on the dynamically allocated tasks in the system they have privilege to access Reporting showing…
Scott Klarenbach
  • 37,171
  • 15
  • 62
  • 91
0
votes
0 answers

Role provider in console/WPF/WinForms application

I have written a role provider which assumes Windows authentication and so far works well with WCF services and ASP.NET. Is it possible to use it also with a console/WPF/WinForm application? I tried a configuration like this on a very simple console…
Valo
  • 1,872
  • 2
  • 15
  • 23
0
votes
1 answer

Things to consider when using a Custom Role Provider with IIS6

I deployed a website on IIS7.5. It worked fine. When I tried to deploy it on IIS6 I got a "Configuration Error" regarding the CustomRoleProvider(*Line 65*) . What seems to be the problem?
Byronic Coder
  • 84
  • 1
  • 1
  • 8
0
votes
1 answer

ASP.Net Roles and Membership check for Users in role for multiple roles

I have users in membership and one user can have one or more than one roles assigned. I want to check for specific roles of a page for example: Role1, Role2, Role3, Role4, Role5 Users who have access of Role2 and Role3 can access Page1.aspx and Also…
k-s
  • 2,192
  • 11
  • 39
  • 73
0
votes
1 answer

urlauthorization with custom roleprovider

I am interacting with a third party httpmodule for authentication. I implemented my custom roleprovider to interact with that. However they use a CustomPrincipal instead of the expected RolePrincipal for urlauthorization. In which event in…
Nyla Pareska
  • 1,377
  • 6
  • 22
  • 37
0
votes
0 answers

Handling Errors from Custom Role Provider C# MVC4

I have build Custom Role Provider project working with MVC4 C# application and it works fine but when an error occur in role provider like SQL Server is down application receive error like: Source Error: Line 46:
Mike
  • 1
  • 2
0
votes
1 answer

External RoleProviders and compiling?

I've built a custom RoleProvider which uses an already existing datasource (from a web service) to dtermine roles. It's written in C#, and I want to be able to compile it as a DLL so I can distribute it to others within the organisation and they can…
Jak
  • 75
  • 2
  • 7
0
votes
1 answer

How to set a role provider at runtime?

I need to be able to set a RoleProvider at runtime. I don't even know where it is coming from -- I am using some loosely coupled dependency injection -- so I can't even define it in the web.config file. How do I set the role provider at runtime?
Brian Genisio
  • 47,787
  • 16
  • 124
  • 167
0
votes
1 answer

Capturing Return Value of stored procedure

im trying to implement Custom Role provider for my .Net application. Im trying to check if the role added by user already exists in the db or not by using the Asp.NET's role provider stored procedure like SqlConnection sqlConnection = new…
John x
  • 4,031
  • 8
  • 42
  • 67
0
votes
0 answers

Configure default role provider in subfolder

I have a two custom role providers. One of them is set as the default role provider in the root web.config
Brett
  • 1,140
  • 10
  • 16
0
votes
1 answer

Is it possible to pass additional data to custom RoleProvider in MVC?

I am implementing my custom Role provider. I need access to some additional data in the following functions and I am not sure if it is possible. Is there a way to instantiate the CustomRoleProvider class by code and set some properties to pass the…
Jyina
  • 2,530
  • 9
  • 42
  • 80
0
votes
1 answer

custom Role Provider initilized but not being used?

I am trying to use a simple custom role provider and using the code from here: http://code.google.com/p/sfckopanka/source/browse/trunk/App_Code/OdbcRoleProvider.cs?r=45 Which is implemented using this:…
Slee
  • 27,498
  • 52
  • 145
  • 243