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

Is there an open source WebSockets (JavaScript) XMPP library? -

java - Is there an object like a "Set" that can contain only unique string values, but also contain a count on the number of occurrences of the string value? -

mysql - Can mysql_pconnect be called multiple times in one php page? -