Retrieving Roles

Discussion in 'ASP .Net Security' started by Prashant K, Oct 3, 2005.

  1. Prashant K

    Prashant K Guest

    Hi Experts,

    I am using C# / ADSI in my ASP.Net application. I want to implement role
    based security in my application. I want to make restrictions in my
    application based on the groups which the user belongs. I am using a custom
    Login page and not windows integrated authentication. The user enters a
    valid userid and password to login.

    Can anyone tell me how to get the roles of the logged in user.

    Thanx in Advance
    Regards
    Prashant K, Oct 3, 2005
    #1
    1. Advertising

  2. Prashant K

    Jas Guest

    If you are using Froms auth. and this is pre 2.0 your application probably
    stores the roles somewhere in the database. Along with every user, you
    should have a list of all the roles he/she belongs to. Once you retrieve
    this you can use the GenericPrincipal object.

    jas

    > Hi Experts,
    >
    > I am using C# / ADSI in my ASP.Net application. I want to implement role
    > based security in my application. I want to make restrictions in my
    > application based on the groups which the user belongs. I am using a custom
    > Login page and not windows integrated authentication. The user enters a
    > valid userid and password to login.
    >
    > Can anyone tell me how to get the roles of the logged in user.
    >
    > Thanx in Advance
    > Regards
    >
    Jas, Oct 5, 2005
    #2
    1. Advertising

  3. Hello JAS,

    is you mention ADSI - i assume your users a stored in AD/ADAM??

    you can retrieve the roles of the user by using LDAP - wait until Joe Kaplan
    jumps on that thread - he is the LDAP man!

    ---------------------------------------
    Dominick Baier - DevelopMentor
    http://www.leastprivilege.com

    > If you are using Froms auth. and this is pre 2.0 your application
    > probably stores the roles somewhere in the database. Along with every
    > user, you should have a list of all the roles he/she belongs to. Once
    > you retrieve this you can use the GenericPrincipal object.
    >
    > jas
    >
    >> Hi Experts,
    >>
    >> I am using C# / ADSI in my ASP.Net application. I want to implement
    >> role based security in my application. I want to make restrictions in
    >> my application based on the groups which the user belongs. I am
    >> using a custom Login page and not windows integrated authentication.
    >> The user enters a valid userid and password to login.
    >>
    >> Can anyone tell me how to get the roles of the logged in user.
    >>
    >> Thanx in Advance
    >> Regard
    Dominick Baier [DevelopMentor], Oct 5, 2005
    #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. JerryP

    Get FSMO Roles ?

    JerryP, Sep 5, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    5,296
    Ross Donald
    Sep 13, 2003
  2. Justin Dutoit

    Newbie Q on roles

    Justin Dutoit, Aug 18, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    311
    Michal A. Valasek
    Aug 18, 2003
  3. VSK
    Replies:
    0
    Views:
    334
  4. Replies:
    0
    Views:
    341
  5. Jéjé
    Replies:
    0
    Views:
    216
    Jéjé
    Sep 27, 2005
Loading...

Share This Page