c# - Is there a quick way to pull all of the users from Active Directory? -


I am trying to drag the username of every user available through Active Directory. Here is the first code to use my code, but this method pulls out all memory and removes memory exceptions. Is there a quick alternative?

  Arrayylist as a slow user = string = new altillist like dim split = "LDAP: //test.ca/OU=foo,OU=bar,OU=foobar, DC = Test, DC = Ca "Reduce as the new directory entry" (spath, nothing, nothing, authentication type.) Protect my directory as my directory directory (myDirectory) mySearcher.Filter = ("(objectClass = user)" I) Integer for I = MySearcher.FindAll (). Calculation - 1 user list add (mySearcher.FindAll.Item (i) .propert ("DisplayName"). Item (0)) Next  

FindAll Every time the call goes back to the LDAP server, it means that every time you go into the loop, you are executing it (and killing the server) above it, in the middle of the data If the data changes, you will probably see some weird bugs (and difficult to diagnose).

I do not really do VB.NET, but something like this should work:

  Dim Search: Rijal T = X Available for each item mySearcher.FindAll () userList.Add (item.Properties ( "DisplayName"). Item (0)) Next  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -