Question

Say there are three roles, namely:

  • Registered
  • Administrator
  • Sponsor

I'd like users to be able to self-register as Registered (easy enough out-of-box). I'd like an Administrator to be able to see all registered users and check off the "Sponsor" checkbox, making the user a Sponsor.

Once the user is "checked" as a Sponsor, the Administrator should be able to add additional parameters for the Sponsor, including logo and Sponsor URL, which webpage(s) they are sponsoring, the valid date range for the sponsorship by webpage, the number of impressions and clicks, and also "paid/not paid".

I'm trying to wrap my head around Memberships and Profiles, and see how they apply to this.

Can anyone provide a general framework as to how I can properly architect this? Are there Nuget packages to do just this?

Advice appreciated.

Was it helpful?

Solution

Maybe my answer to another question will help a bit Using out of the box aspnet membership for public facing website

In Nuget - Thinktecture.IdentityModel is a way to go.

OTHER TIPS

Use the table profile provider. You can then edit the values in this table directly through a simple page.

Excluding the profile provider, is there an easy way to add custom fields to ASP.NET membership?

You can then use the web interface to assign a user to a role as an admin: http://msdn.microsoft.com/en-us/library/t32yf0a9.aspx

Or simply code this page and use Roles.AddUserToRole http://msdn.microsoft.com/en-us/library/system.web.security.roles.addusertorole.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top