using AuthorizationStoreRoleProvider directly without activating the rolemanager?

J

Jéjé

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.
 
D

Dominick Baier

Hello Jéjé,

you can completely configure the role provider in config.

in code you can access it via

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

Jéjé

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 said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top