Role Provider

Discussion in 'ASP .Net' started by John Yopp, Jun 19, 2006.

  1. John Yopp

    John Yopp Guest

    I have created my own custom Membership and Role providers and
    everything works fine. However, I want to be able to determine if the
    user is in a particular role when I am validating the user. Since this
    code is already part of my Role Provide, does anyone know how to
    reference the current instance of the Role Provider so that I don't have
    to instantiate another instance?

    Thanks
     
    John Yopp, Jun 19, 2006
    #1
    1. Advertising

  2. John Yopp

    Brock Allen Guest

    Roles.Providers["YourProviderID"]

    -Brock
    http://staff.develop.com/ballen


    > I have created my own custom Membership and Role providers and
    > everything works fine. However, I want to be able to determine if the
    > user is in a particular role when I am validating the user. Since
    > this
    > code is already part of my Role Provide, does anyone know how to
    > reference the current instance of the Role Provider so that I don't
    > have
    > to instantiate another instance?
    > Thanks
    >
     
    Brock Allen, Jun 20, 2006
    #2
    1. Advertising

  3. John Yopp

    John Yopp Guest

    Excellent! Thanks for the help.

    I suspected it was as simple as this. But, couldn't find any documentation.

    Thanks again Brock.



    Brock Allen wrote:
    > Roles.Providers["YourProviderID"]
    >
    > -Brock
    > http://staff.develop.com/ballen
    >
    >
    >> I have created my own custom Membership and Role providers and
    >> everything works fine. However, I want to be able to determine if the
    >> user is in a particular role when I am validating the user. Since
    >> this
    >> code is already part of my Role Provide, does anyone know how to
    >> reference the current instance of the Role Provider so that I don't
    >> have
    >> to instantiate another instance?
    >> Thanks
    >>

    >
    >
     
    John Yopp, Jun 20, 2006
    #3
    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. Jesper Stocholm
    Replies:
    2
    Views:
    8,219
    John Saunders
    Aug 23, 2003
  2. Liet Kynes
    Replies:
    0
    Views:
    527
    Liet Kynes
    Nov 26, 2003
  3. Liming

    Memebership, Role, Profile Provider

    Liming, Jan 6, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    572
    john smith
    Jan 7, 2006
  4. sloan
    Replies:
    1
    Views:
    552
    Chad Scharf
    Jul 3, 2007
  5. Kursat
    Replies:
    1
    Views:
    334
    Dominick Baier
    May 7, 2007
Loading...

Share This Page