asp.net member roles

Last post 05-09-2008 6:02 PM by anas. 5 replies.

Sort Posts:

  • asp.net member roles

    05-09-2008, 11:14 AM
    • Member
      20 point Member
    • bigjoe11a
    • Member since 05-09-2008, 3:11 PM
    • North Canton, Ohio USA
    • Posts 222

    I wanted to ask when a user creates a account so that they can log in. What sets the members Roles. Does any one have an idea on this and is there a video on that subject

     

    Joe

     

  • Re: asp.net member roles

    05-09-2008, 12:33 PM
    • Contributor
      2,255 point Contributor
    • benrick
    • Member since 07-27-2006, 3:12 PM
    • Kent, Ohio
    • Posts 379
    • TrustedFriends-MVPs

    The user will "by default" not be associated with any roles. There is a table in the datavase called aspnet_usersinroles which handles that. It has an entry for each role a user has. When you develop role management pages their job is just to manage the rows in that database table.

    This is a very in depth series on membership if you want to learn about membership.

    http://aspnet.4guysfromrolla.com/articles/120705-1.aspx

    I hope that helps,
    Brendan
     

    C. Brendan Enrick
    Brendan's Blog

    Make sure you click "Mark as Answer" for any post which has helped you. This will give recognition to those helping others as well as earn you a point. It also helps people know which posts still need work.
    Filed under:
  • Re: asp.net member roles

    05-09-2008, 1:39 PM
    • Member
      20 point Member
    • bigjoe11a
    • Member since 05-09-2008, 3:11 PM
    • North Canton, Ohio USA
    • Posts 222

     Thanks That did Help a little. What I'm trying to do is to add a Role Name called Member to each one who enrolls for the first time. I did Find the option

    AddUserToRole(UserName, RoleName)

    Its just that it didn't tell me where I can add this line at in my page. When user signs up. The other option I'm looking into is all so  to add more questions in the CraeteUserWizzard. Right I haven't fount any thing on that yet.

     

     

  • Re: asp.net member roles

    05-09-2008, 4:22 PM
    Answer
    • Contributor
      2,255 point Contributor
    • benrick
    • Member since 07-27-2006, 3:12 PM
    • Kent, Ohio
    • Posts 379
    • TrustedFriends-MVPs

     If you're using the create user wizard you can just handle the usercreated event for it and there you will have access to the user that was just created and you can add the user into the desired role.

    Brendan
     

    C. Brendan Enrick
    Brendan's Blog

    Make sure you click "Mark as Answer" for any post which has helped you. This will give recognition to those helping others as well as earn you a point. It also helps people know which posts still need work.
  • Re: asp.net member roles

    05-09-2008, 4:38 PM
    • Member
      20 point Member
    • bigjoe11a
    • Member since 05-09-2008, 3:11 PM
    • North Canton, Ohio USA
    • Posts 222

     Ok, can you tell me how to do that

     

  • Re: asp.net member roles

    05-09-2008, 6:02 PM
    Answer
    • All-Star
      60,921 point All-Star
    • anas
    • Member since 09-21-2006, 8:31 AM
    • Palestinian Territory, Occupied
    • Posts 6,865
    • Moderator

    bigjoe11a:

    AddUserToRole(UserName, RoleName)

    Its just that it didn't tell me where I can add this line at in my page. When user signs up

     

    refer to this thread : http://forums.asp.net/t/1259172.aspx 

    bigjoe11a:
    The other option I'm looking into is all so  to add more questions in the CraeteUserWizzard. Right I haven't fount any thing on that yet.

    refer to this thread : http://forums.asp.net/p/1247293/2299683.aspx 

     
     

    Regards,

    Anas Ghanem | Blog

Page 1 of 1 (6 items)