Last post Jan 11, 2006 10:46 AM by dunnry
Jan 09, 2006 06:20 PM|patrick24601|LINK
We have a VB.NET 1.1 program that has been running on a monthly basis extracting userid information from AD. (Since our forest is pretty big I had to write the program to loop through each domain and then each letter of the alphabet. This is the only way
I can consistently prevent timeouts).
All of a sudden every query is failing with no change in the code. I am going to post part of the query setup and call below. Is there anything obvious that I am doing wrong? The code is failing on the 'NativeObject' line. It just keeps coming back and saying
every domain that it is trying to query is not found.
obj = de.NativeObject
.SearchRoot = de
.Filter = "(&(mail=*)(sn=" & lastname & "*)(samaccountname=*)(objectCategory=CN=Person,CN=Schema,CN=Configuration,DC=company,DC=com))"
Results = .FindAll()
x = Results.Count
Jan 11, 2006 10:17 AM|dunnry|LINK
Jan 11, 2006 10:24 AM|patrick24601|LINK
Thanks for the response. A couple of follow on questions so I (and others that follow me) can understand where I messed up:
1. With the NativeObject call am I essentially making the query twice?
2. I obviously got the NativeObject call from an example online and did not know entirely what I was doing with it. When would that call to NativeObject be appropriate.
Jan 11, 2006 10:46 AM|dunnry|LINK