using AuthorizationStoreRoleProvider directly without activating the rolemanager?

Discussion in 'ASP .Net Security' started by Jéjé, Jul 11, 2006.

  1. Jéjé

    Jéjé Guest

    Hi,

    I want to use the AuthorizationStoreRoleProvider class using my own code but
    NOT to authenticate and authorize the users in my current web application,
    only to manage some security part of my active directory.

    In my web.config, I have added some configuration information (like the
    connectionstring which point to my active directory)
    now I want to initialize the AuthorizationStoreRoleProvider object...

    Public Shared Function GetRoles() As String()

    Dim o2 As New System.Web.Security.AuthorizationStoreRoleProvider

    o2.ApplicationName = "/"

    o2.ScopeName = ""

    o2.Initialize(<????>, <????>)

    Return o2.GetAllRoles()

    End Function



    what are the parameters I have to send to the Initialize function?



    Thanks.

    Jerome.
    Jéjé, Jul 11, 2006
    #1
    1. Advertising

  2. Hello Jéjé,

    you can completely configure the role provider in config.

    in code you can access it via

    Roles.Providers["name"].GetAllRoles();



    > Hi,
    >
    > I want to use the AuthorizationStoreRoleProvider class using my own
    > code but NOT to authenticate and authorize the users in my current web
    > application, only to manage some security part of my active directory.
    >
    > In my web.config, I have added some configuration information (like
    > the
    > connectionstring which point to my active directory)
    > now I want to initialize the AuthorizationStoreRoleProvider object...
    > Public Shared Function GetRoles() As String()
    >
    > Dim o2 As New System.Web.Security.AuthorizationStoreRoleProvider
    >
    > o2.ApplicationName = "/"
    >
    > o2.ScopeName = ""
    >
    > o2.Initialize(<????>, <????>)
    >
    > Return o2.GetAllRoles()
    >
    > End Function
    >
    > what are the parameters I have to send to the Initialize function?
    >
    > Thanks.
    >
    > Jerome.
    >
    Dominick Baier, Jul 11, 2006
    #2
    1. Advertising

  3. Jéjé

    Jéjé Guest

    so simple :)

    but now I receive this error:
    Insufficient access rights to perform the operation. (Exception from
    HRESULT: 0x80072098)
    the delegation works fine and I can access other resources using my web
    site.
    I have changed the AD seurity to allow "everyone" to read it, no change!

    can I specify specific credential when I want to access the AD? (changing
    the identity in the web.config appear to not help me)


    "Dominick Baier" <dbaier@pleasepleasenospam_leastprivilege.com> wrote in
    message news:...
    > Hello Jéjé,
    >
    > you can completely configure the role provider in config.
    > in code you can access it via
    >
    > Roles.Providers["name"].GetAllRoles();
    >
    >
    >
    >> Hi,
    >>
    >> I want to use the AuthorizationStoreRoleProvider class using my own
    >> code but NOT to authenticate and authorize the users in my current web
    >> application, only to manage some security part of my active directory.
    >>
    >> In my web.config, I have added some configuration information (like
    >> the
    >> connectionstring which point to my active directory)
    >> now I want to initialize the AuthorizationStoreRoleProvider object...
    >> Public Shared Function GetRoles() As String()
    >>
    >> Dim o2 As New System.Web.Security.AuthorizationStoreRoleProvider
    >>
    >> o2.ApplicationName = "/"
    >>
    >> o2.ScopeName = ""
    >>
    >> o2.Initialize(<????>, <????>)
    >>
    >> Return o2.GetAllRoles()
    >>
    >> End Function
    >>
    >> what are the parameters I have to send to the Initialize function?
    >>
    >> Thanks.
    >>
    >> Jerome.
    >>

    >
    >
    Jéjé, Jul 11, 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. Weaver
    Replies:
    0
    Views:
    726
    Weaver
    Jan 18, 2006
  2. John Dow
    Replies:
    0
    Views:
    172
    John Dow
    Jan 22, 2008
  3. John Toop

    roleManager using a Custom role provider

    John Toop, Jun 8, 2009, in forum: ASP .Net Security
    Replies:
    0
    Views:
    795
    John Toop
    Jun 8, 2009
  4. Jeppe 1971

    Loading HTML-page without activating it

    Jeppe 1971, Dec 4, 2003, in forum: Javascript
    Replies:
    1
    Views:
    88
    Richard Cornford
    Dec 4, 2003
  5. Carlos  Araya
    Replies:
    10
    Views:
    172
    Carlos
    Dec 28, 2006
Loading...

Share This Page