roleManager using a Custom role provider

Discussion in 'ASP .Net Security' started by John Toop, Jun 8, 2009.

  1. John Toop

    John Toop Guest

    I've read a number of places that give examples of how to do this but I could
    never get it. Most examples used forms authentication but I found if
    difficult to understand which steps were important and which weren't, so
    here's my contribution:

    I created a <roleManager ... /roleManager> tag inside <system.web>

    it was a lot simpler than I thought

    <roleManager defaultProvider="myRoleProvider" enabled="true">
    <providers>
    <clear/>
    <add name="myRoleProvider" type="Humber.Roles.myRoleProvider" />
    </providers>
    </roleManager>

    Where I got caught was I had no idea that the custom class had to reside
    within a nameSpace (I put a nameSpace somename ... End nameSpace around my
    class. I named my nameSpace "Humber.Roles" and my class I called
    myRoleProvider. The name of the "RoleProvider" that I created within my
    custom class became my roleProvider which was called as the defaultProvider.
    The type is the concatenation of the namespace and the class inside of it.
     
    John Toop, Jun 8, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QmVuIFIu?=

    debug a custom membership and role provider?

    =?Utf-8?B?QmVuIFIu?=, Mar 27, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    3,891
    =?Utf-8?B?dWxyaWNoIHNjaHVtYWNoZXI=?=
    May 17, 2006
  2. CK

    Custom Role Provider

    CK, Jul 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    5,092
    Winista
    Jul 25, 2006
  3. Alias
    Replies:
    5
    Views:
    700
    =?Utf-8?B?TWlsb3N6IFNrYWxlY2tpIFtNQ0FEXQ==?=
    Feb 18, 2007
  4. J
    Replies:
    0
    Views:
    1,039
  5. sloan
    Replies:
    1
    Views:
    551
    Chad Scharf
    Jul 3, 2007
Loading...

Share This Page