Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Asp.net complex membership implementation

Posted on 2011-10-09
6
Medium Priority
?
185 Views
Last Modified: 2012-05-12
Hi,
I need to implement a somehow complex membership and authorisation. The requirements include a the normal authentication... But each user can be a member of 1 or more group. And their role per group may differ. Eg. User1 can be a member of group A in which he is an administrator... And be a member of group B but with a role of jus a regular user.
Apart from that, each member may have different "permissions" that they can do something like the NT logins.
I have reasearched that I can probably use azman... Is azman good? Is there an alternative approach like a modified role provider? Is there such as group provider?
0
Comment
Question by:karlomedallo23
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 11

Expert Comment

by:brutaldev
ID: 36939284
Why not use the built-in role membership provider that comes with ASP.NET? Once this is in place it's as easy as using HttpContext.Current.User.IsInRole("MyRole") to check for permission.
0
 
LVL 21

Expert Comment

by:Dale Burrell
ID: 36939601
The built in membership provider doesn't allow for groups and roles within groups, but you could handle that yourself with a specified role naming convention e.g.

Group1-Member
Group1-Admin
Group2-Member
Group2-Admin

Then you can assign to users as you like, and implement the checks in the page as you like.
0
 
LVL 2

Author Comment

by:karlomedallo23
ID: 36975827
@brutaldev: roles provider is not enough for what's required. To be clear, I need, sort of, 4 providers... Membership, group, roles, and permissions...

@dale_burrel: I could have settled down with what you have suggested but thhe permissions are really getting on the way.. is ithere a way to implement a custom "provider" in which I would probably call permissions provider and will work together with the roles provider? Or maybe implement two instances of roles provider 1 for your group_role suggeztion Nd the other for permission?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 21

Expert Comment

by:Dale Burrell
ID: 36976704
You can certainly implement custom providers... I've never done it so I can only offer the MS documentation e.g. http://msdn.microsoft.com/en-us/library/8fw7xh74.aspx
0
 
LVL 2

Author Comment

by:karlomedallo23
ID: 36977523
@dale_burrell: if I implement one, is it possible to have 2 role providers active in one application?
0
 
LVL 21

Accepted Solution

by:
Dale Burrell earned 1000 total points
ID: 36977550
You definitely can, i haven't had much experience with multiple providers, but I from what I have had you end up needing to do a bit more work, because the membership framework uses the initial providers you specify, but when you need more than one you actually have to explicitly tell it which provider you are using.

A quick google for "asp.net multiple role providers" gives plenty more information. I recon what you may want to do is create a single custom role provider which accesses its data from 2 separate sources depending on circumstances.
0

Featured Post

Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question