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

Changing HttpContext.Current.User.Identity.Name

During SetAuthCookie part we are manipulating user name slightly like this string userInfo = identity.Name + "|" + Util.GetIPAddress(); FormsAuthentication.SetAuthCookie(userInfo, isPersistent); this is in order to make some checks with users IP…
Ege Bayrak
  • 1,139
  • 3
  • 20
  • 49
0
votes
1 answer

ASP.NET User/Role Management in VS2010 - skipping over the SQL Express version and going straight to SQL Server 2008 R2

As I'm learning the ins and outs of ASP.NET user management, I've learned that the default in VS is for it to use a SQL Server Express .mdf file for the data it needs to save. This won't help me for when I deploy my site, as I'm running SQL Server…
Major Productions
  • 5,914
  • 13
  • 70
  • 149
0
votes
1 answer

Custom Role Provider Not Being Used

Alright so I made a custom role provider for my website and no matter what I do I can't get the code in the overridden functions to get hit. This is the Custom Role Provider namespace XXX.Security { using System; using System.Linq; using…
0
votes
2 answers

ASP.NET MVC, One Role for two user, and little different behavior for each user

We have implemented custom roleprovider. This provide us to restricts access to parts of our site using roles. Now we have situation when two users have role Administrator. But one user1 can add comments, and user2 can not add comments(user1 and…
Sergii
  • 749
  • 3
  • 15
  • 36
0
votes
2 answers

Console Application with ASP.NET Authentication

Here's the situation, I've got a console application that needs to run once a day and make a few requests to pages that require authentication to view. The pages are hosted in a really basic ASP.Net Web Application. So, I know that in order for the…
0
votes
1 answer

Handling Nested Group Permisions (ASP.NET Role Provider)

We have a security module which, based on group/role membership, controls permissions to resources in ASP.Net. I've built a custom ASP.Net Role Provider that queries Active Directory for group membership and which is used by this module. Security…
0
votes
1 answer

Is it possible using the Microsoft Role provider to "temporarily" add a user to a role at runtime?

I am implementing a custom Membership Provider and a custom Role Provider. It is working fine. I have a custom database that has all of my users and all of the roles and most of the associations between users and roles. There are a few roles…
0
votes
1 answer

Custom Role Provider

I'm in charge of supporting an intranet website that has different applications. Each application has it's own security with it's own set of groups and users with specific authorizations. I'm just trying to figure out how to use Identity (role,…
0
votes
1 answer

ASP.NET MVC 5 Custom Role Provider not returning expected values

I am fairly new to this custom role provider(I think its good though), now I am trying to get the user to see or access certain parts of the web app based on their roles, this roles are in the database(admin,user and super_user). I have a class…
Mronzer
  • 399
  • 1
  • 7
  • 18
0
votes
1 answer

c# roles multiple providers cant call function

My role providers:
atroul
  • 51
  • 1
  • 13
0
votes
1 answer

Encrypted UserName In GetRolesForUser RoleProvider

I Encrypt and Decrypt Data with Key and Iv, and encryepted UserName.(create a key and iv for each user register on my site) so i need to specify key and iv for decrypt each username GetRolesForUser method in RoleProvider only have one parameter…
0
votes
0 answers

How do I implement a custom method for my SQL role provider? Or overwrite an existing one?

I'm using ASP.NET's role provider, and everything is working swell. On my role administration screen, however, I'd like to show not just the names of existing roles, but their descriptions as well. The field exists in SQL table generated by the…
Karl
  • 189
  • 2
  • 3
  • 16
0
votes
1 answer

Value can not be null on Role Provider

I am beginner at MVC C#. Now I am trying to build a custom authentication with role provider, but when it check for user role its getting an error that "Value can not be null". Here is my RoleProvider: public class MyRoleProvider:RoleProvider { …
0
votes
0 answers

ASP.NET roles (old style) not "persisting"?

So, I'm using "old style" ASP.NET roles and auth. I have a custom log in page which redirects based on roles upon login. Works fine... But when I get to the destination page where I need to recheck, it fails. Same user, same role, etc. I've tried…
PaulBinCT2
  • 221
  • 2
  • 14
0
votes
1 answer

sample c# code to manage roles with roles provider

i want to implement asp.net role provider to assign users over my LAN to roles and have my asp.net intranet app implement security based on roles. i dont want to use VS to manage this with the built in tools but rather hand this off to users to…
kacalapy
  • 9,806
  • 20
  • 74
  • 119