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

User role update doesn't work!

So, a user is registering in my application (ASP .NET MVC 3). If registration is succesful, is assign him a role named "unreg" (meaning his society isn't yet registered). Completion of registration will redirect him to the specified action…
davvidd
  • 73
  • 2
  • 10
0
votes
1 answer

Extending ASP.NET Role provider in MVC

I want know if this can be done and if there is somewhere that you can point me in the right direction. Basically, at the moment, i am using the built in Role Provider for asp.net, on my controller actions, i use a custom attribute filter as…
xqwzid
  • 520
  • 3
  • 14
0
votes
1 answer

Is there an alternative to using RoleProvider?

I'm working on an application where a user can be in one two 'groups' of users (teachers and students). For my needs, a user will never need to be moved from one role to another. While I certainly could create a custom RoleProvider, it seems a bit…
michael
  • 451
  • 3
  • 7
0
votes
1 answer

asp2 roles and membership settings in web.config

How can i set up web.config file to support user membership with roles for my mvc page with only database file as i do not have access to sql server at the moment.
cpoDesign
  • 8,953
  • 13
  • 62
  • 106
0
votes
3 answers

how to auto redirect on login link click to admin page if user already logged in

How to do this ... i have a login page link above the page /// i want if user already loggedin then anybody click on loginlink then the user will automatically redirect to default.aspx .. how to do this using vb.net ?
prerna
  • 1
  • 3
0
votes
2 answers

how to show failure text if the loggedin user role not found ...?

How to display login failure text if user logging in user role id differ than vendors role ... i m using the following code to authenticate user role during logging in Protected Sub Login3_LoggingIn(ByVal sender As Object, ByVal e As…
0
votes
1 answer

how to validate user role during login button click event in login control?

I have a login control in my asp.net webform i uses the roles manager... i have two roles admin and vendors i want when user enter username and password in login control then on login button click event it validates either the user is admin or…
0
votes
2 answers

How can I allow a user to assign different site functions to different roles in an asp.net role provider?

I am debating on whether or not to write my own authentication class. It's almost done but I think it could be better to use a role provider (either custom or the default.) I know you can assign users to roles, and then display info to the user…
Shawn
  • 19,465
  • 20
  • 98
  • 152
0
votes
1 answer

Setting ASP.Net Role Provider Programmatically

I have a requirement for multiple Role Providers per website. What I'm not seeing is if/how to tell ASP.Net which provider to use (similar to the membership provider property on the login controls). I have a feeling that since this is done (I…
John Hoven
  • 4,085
  • 2
  • 28
  • 32
0
votes
1 answer

Custom role provider for SharePoint 2010:

I have written both custom Membership and Role providers for SharePoint 2010. The Membership provider has been working just fine for months. I just finished the Role provider, added it to the GAC, set it up in Central Admin, and added it to the…
RepDetec
  • 741
  • 13
  • 29
0
votes
1 answer

Live testing ASP.NET custom Role Provider

Using ASP.NET Webforms + VB/C# I've been tasked to restrict ASP.NET page access to users not in specific roles. And I need to be able to live test my solution (versus unit testing where I could use mocks or fakes). Our site is rather complex so I…
RandyB
  • 325
  • 4
  • 13
0
votes
1 answer

auto login while testing (and assigning a particular role to a testing user)

I found this: ASP.NET forms authentication - auto login with a test account while debugging? - which would get me half the way there. What would be the recommended approach to attach roles to the signed on user (for testing different permissions). …
0
votes
1 answer

what are Provider Abilities with Custom Role Providers in Sitefinity

I'm trying to implement a custom role provider in sitefinity. I've found a few examples but I can't find anything that's documented that well. One of the things I'd like to know more about is what options are available in the Provider Abilities…
CWaters
  • 175
  • 1
  • 4
0
votes
0 answers

Initializing new user login to role 'User' (EntityFramework/RoleManager)

I'm trying to create a user profile with the role of "User" on first login. The code below is creating the user profile, but the role is not being assigned properly. Can you identify what I am missing? var roleStore = new…
0
votes
2 answers

Hierarchical SQL roles based on default ASP.NET RoleProvider

I'm trying to implement the following adjustments to the default ASP.NET RoleProvider so that it supports hierarchical role definitions. However i cannot create the following function, it keeps Executing the function... Ref:…
Ropstah
  • 17,538
  • 24
  • 120
  • 194