Reputation: 15866
I managed the roles before with asp.net configuraition tool. I installed Mvc 4. I created a new mvc 4 internet app. It use simpleMembershipProvider and it is not compatible with asp.net configuration tool.
Is there any simple way to manage userRoles? Should I manage them with hardcode? And Could you give more information about simpleMembershipProvider? (usage, adventages, etc...)
Thanks I lot...
Upvotes: 2
Views: 7402
Reputation: 2929
After struggling with trying to code this myself and looking for step by step tutorials, I found this package that auto builds a very simple user/role management system. It will need to be extended to your project, but it should give you the start/example to build upon:
http://www.nuget.org/packages/SimpleMembershipAdministration/
Upvotes: 0
Reputation: 145880
This page contains a great overview of just about everything you need to know
Specifically on role management the options are as follows
WSAT is built to work with ASP.NET Membership, and is not compatible with Simple Membership. There are two main options there:
Use the WebSecurity and OAuthWebSecurity API to manage the users and roles
Create a web admin using the above APIs
Since SimpleMembership runs on top of your database, you can update your users as you would any other data - via EF or even in direct database edits (in development, of course)
Upvotes: 0
Reputation: 4803
According to this page you need to either administer roles directly in the database or write your own pages to manage roles:
http://www.asp.net/web-pages/tutorials/security/16-adding-security-and-membership
The ASP.NET membership system is set up to support roles. However, unlike membership registration > and login, the Starter Site template does not contain pages that help you manage roles. (Managing > roles is an administrative task rather than a user task.)"
Upvotes: 4