Custom Membership Provider for 3 groups of users

Last post 07-19-2006 2:09 AM by topm. 0 replies.

Sort Posts:

  • Custom Membership Provider for 3 groups of users

    07-19-2006, 2:09 AM
    • Member
      30 point Member
    • topm
    • Member since 01-10-2006, 6:41 PM
    • Posts 8

    I have a Classic ASP web site for music events.  Currently 500 performers and 100 venues login through custom ASP pages to update their information.  I'd like to rebuild the site with ASP.NET 2.0 and use the built-in login controls without making too many changes to my database.  The user login section will be all .Net 2.0 pages, but the public pages will still be ASP util I get around to updating them.

    Currently, when a performer or venue logs in, they have access to one database record, and can modify their record.  This is what i'm having trouble understanding. How does a logged in user edit one specific record in a table that matches their ID?  I built a sample web site with the login controls, but every user can see every record. 

    Everything i've read talks about writing a custom provider which should resove my problem, and i've looked at a lot of documentation.  Most articles say you can "easily" create a custom membership provider, but it doesn't look that easy...  I have basic VB skills, and it seems every provider sample is written in C#.   Are there any samples in VB?

    My musician table has an ID, Email, and Password fields.  I use the email and password fields to authenticate the user, and then I put the ID in a session variable so the user can only modify records with their record ID.

    My venue table has the same fields, but they use a different set of web page to add show dates and edit their information.

    I'd like to create a member table too so that vistors must login before viewing some pages.

    So here are some ideas I had to resolve the problem.

    1. Add the aspnet_membership/userid field to my musician, venue and membership table to link the tables.  After the user logs in, put the musician/ID field in a session variable so they can edit their record.  Not sure how difficult it would be to make this happen when a new user is added.

    2. Add 2 fields to the aspnet_membership table.  One field would identify the user as a performer, venue, or member.  Another field would store the ID from the performer, venue or membership table.  I doubt that this is a good idea.

    3. Figure out how to build the custom membership provider.  Would my configuration with 2 or 3 tables of members make a custom provider complicated?  Can anyone point me to a sample that has a similar configuration, especially in VB?

    I downloaded the ASP.NET Provider Toolkit SQL Samples, but i'm not sure how i'm supposed to use it...

    Thanks for any help!!!

     

Page 1 of 1 (1 items)