valdeloire,
In the pages I provided, in the code, there is a variable objRootOU. That variuable defines the starting OU for the queries. The queries will then look in that OU and any other OU nested in it.
To all of the various security questions:
2k or not 2k : The examples I have shown, and the advice I have given apply to Win2k only. Though some info may hold true for Win2k3, I do not have a 2k3 domain do test for functionality. MS has made changes to the security of LDAP and GC when the made 2k3. You may need to refer to MSKB or MSDN for info on the differences.
IIS : Successful LDAP queries seem to reply on two things (other than proper programming) MDAC and user credentials. Step 1 - update the IIS server to latest version of MDAC. I believe 2.8 is the latest. It just may fix some of your issues. Step 2 - verify the user credentials that are being used to query LDAP. Under normal circumstances the IUSR_machine account can NOT query ldap. If anonymous pages are to be used with that account, the username and password for a domain account with atleast read access MUST be hardcoded in the ASP. What you can do (this is what I have done) is to create a very low-privledged domain account for the sole purpose of submitting queries. Change IIS settings to use that account instead of the IUSR account. You would only need to make thius change on the folder which contains the ASP pages. If you do this, verify the NTFS permissions on those files to be sure that the account has read access. For non-anonymous access, you can use Integrated Windows or Basic authentication. To use Integraded a few conditions MUST be true: anonymous access MUST be disabled, the client browser MUST support it and be enabled, and the client is logged in using a domain account. If all of this is true, Integrated works well. If the client end is not true, the security access reverts back to Basic. To verify the user credentials use:
Code:
Response.Write "AUTH_USER = " & Request.ServerVariables("AUTH_USER")
to display the username. If it comes up blank, you are using the IUSR_machine account.
There is a wya to configure Active Directory to allow anonymous queries (MSKB article ID 320528) but I have not tested it, nore would I want to. Changing permissions on Active Directory can be a VERY BAD thing if done incorrectly. I seriously DO NOT RECOMMEND it.
A few other notes when you do your queries:
Querying a GC is faster than LDAP, however, the Global Catalog may not contain all of the fields you are looking for. But that can be easily modified. (MSKB article ID 229662)
I don't know when I will have the time to answer specific questions. I've been extremely busy. I will what I can as time permits.
I hope this clears up most questions out there.