Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Example of ASP LDAP query string? 14

Status
Not open for further replies.

MikeBronner

Programmer
May 9, 2001
756
0
0
US
Could someone post an example of ASP code used to query LDAP without any proprietary components?

Thanks! Take Care,
Mike
 
Zcolton,

Thanks for the reply we are looking into the security issue. I know we do not want the web server to be an DC. But I can get GC to work if the server is a DC so until we fixed the security issue we are going to leave it that way.

I do have one last question. I am having a little issue with an GC query.


select cn from 'GC://CN=~Account Closing Request,OU=IAMS,DC=opc,DC=cnbwv,DC=local'


This is the Actual String I am using to access the security group within an OU on our domain. When I access it, I can pull the name and basic information about the group.

The question is how would I write a Query using GC to list all the members of this group.

Thanks again for your help!
 
I don't think you can get a list of members using an LDAP query. But try something like this:

Code:
groupldap="CN=~Account Closing Request,OU=IAMS,DC=opc,DC=cnbwv,DC=local"
Set objGroup = GetObject ("GC://"&groupldap&"")
For each objMember in objGroup.Members
 ...
 put you code here...
 reponse.write objMember.CN
 ...
next
Set objGroup=nothing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top