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
1 answer

MVC Role Provider

I am working on a small MVC application and now I want to implement an admin section on the website, so that only admin users can access that page/section. I currently have form authentication login. I followed a tutorial…
kayze
  • 738
  • 8
  • 19
  • 33
0
votes
1 answer

Role Provider error in web.config

My application is in Asp.Net MVC3, my application was running perfectly but all of a sudden i'm getting an error in my Web.Config in my role manager tag. Below is my RoleManager tag of web.config
Sam M
  • 1,077
  • 2
  • 20
  • 42
0
votes
2 answers

Object reference not set to an instance of an object. - Roles doesn't exist on application startup

So, I've got an MVC4 application, and I'm using the default login and registration system. On the home page, I want to redirect or change a message based on a user's role. Here's what I've got in the controller: public ActionResult Index() …
Zook
  • 499
  • 9
  • 20
0
votes
1 answer

Custom Role Provider variables

I have created a custom Role provider with the following overridden method: public override string[] GetRolesForUser(string username) { MyAppUser user = userRepository.Get(u => u.Username == username).FirstOrDefault(); …
Jay
  • 3,012
  • 14
  • 48
  • 99
0
votes
2 answers

Custom RoleProvider and Custom Membership provider

I am working on an MVC4 application that has authentication completed by ADFS before the application is launched and will only be launched by successfully authenticated users. Within the application itself I have a list of users held within the…
0
votes
1 answer

Are there any advantages to create a custom Membership Provider

I've been tasked with creating a ASP.net MVC web-based login system with registration, forgot password, and login but the existing system already has all the stored procedures to support this functionality and they don't fit well within the…
0
votes
1 answer

The Role Manager feature has not been enabled but its enabled in config

I have created the following class for customized roleProvider in a folder called providers within my web project: using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Project.Providers { public class…
Jay
  • 3,012
  • 14
  • 48
  • 99
0
votes
3 answers

where are Roles stored?

I just started dabbling in to ASP.NET security. Have a few questions. 1) I used role management to restrict access to certain page. This was the section of my web.config
doglin
  • 1,651
  • 4
  • 28
  • 38
0
votes
1 answer

How to remove Roles

I added these roles in my code. if (!Roles.RoleExists("Administrators")) Roles.CreateRole("Administrators"); //create intern roles if they don't exist if (!Roles.RoleExists("Intern")) …
doglin
  • 1,651
  • 4
  • 28
  • 38
0
votes
1 answer

Strategies for making asp.net SimpleMembershipProvider Roles have hierarchical relationships

I realize this may be simple to this Question, but the answer is not quite what I am looking for. A closer question that may be what I want is this SO question. The situation is I am using and ASP.NET MVC4 application using SimpleMemberShip…
ledgeJumper
  • 3,560
  • 14
  • 45
  • 92
0
votes
0 answers

Active directory role managing

I develop Intranet application and i have a problem with AD role. User is logged by windows I need only read AD Roles of user by AspNetWindowsTokenRoleProvider provider
Davecz
  • 1,199
  • 3
  • 19
  • 43
0
votes
4 answers

ASP.NET Provider with Different Types of Roles

I have different types of Roles to take into account when authorizing a user. For example: John must have Position Manager and be part of the Office Supplies Department to order a new computer. Problem with Roles is Roles.GetRolesForUser("John")…
teebot
  • 1,089
  • 2
  • 12
  • 25
0
votes
1 answer

mvc3 custom role provider error on Web.Config

I'm trying to figure this out for a few day now, i have custom membership and role providers for my project and it works perfectly on my dev machine, but on production it throws the following error for the web.config Description: An error occurred…
FabioG
  • 2,936
  • 3
  • 31
  • 50
0
votes
2 answers

Using object Helper Methods to implement authorization rules

I have the following:- I am working on an asset management system using Asp.net MVC4 with windows authentication enabled. The system allow to specify what actions a group of users can do(for example certain group can have the authority to add new…
John John
  • 1
  • 72
  • 238
  • 501
0
votes
2 answers

Setup roles programmatically from a console application

I'm writing a setup-application for our web application. One of the tasks is to setup the database for the built-in SqlRoleProvider. I've got my script to create the database with the aspnet_regsql.exe-command, but now I've run into troubles…
Jonas Lincoln
  • 9,567
  • 9
  • 35
  • 49