System.DirectoryServices 1.0.5000.0 System.Reflection.AssemblyKeyFile(KeyFile="../msfinal.pub") System.Reflection.AssemblyDelaySign(DelaySign=True) System.Runtime.InteropServices.ComVisible(Value=False) System.Resources.NeutralResourcesLanguage(CultureName="en-US") System.Reflection.AssemblyInformationalVersion(InformationalVersion="0.0.0.1") System.Reflection.AssemblyDefaultAlias(DefaultAlias="System.DirectoryServices.dll") System.CLSCompliant(IsCompliant=True) System.Reflection.AssemblyTrademark(Trademark="") System.Reflection.AssemblyCopyright(Copyright="(c) 2003 Various Authors") System.Reflection.AssemblyProduct(Product="MONO CLI") System.Reflection.AssemblyCompany(Company="MONO development team") System.Reflection.AssemblyConfiguration(Configuration="Development version") System.Reflection.AssemblyDescription(Description="System.DirectoryServices.dll") System.Reflection.AssemblyTitle(Title="System.DirectoryServices.dll") System.Resources.SatelliteContractVersion(Version="1.0.5000.0") System.ComponentModel.Component System.ComponentModel.IComponent System.IDisposable
- Constructor

  The following table shows the initial property values of the object.

  Property

  Initial value

  A null reference (Nothing in Visual Basic)

  "(objectClass=*)"

  An empty object

  Initializes a new instance of the class with default values.

- Constructor

  The following table shows the initial property values of the object.

  Property

  Initial value

  "(objectClass=*)"

  An empty object

  Initializes a new instance of the class using the specified search root.

  The node in the Active Directory Domain Services hierarchy where the search starts. The property is initialized to this value.
- Constructor

  The following table shows the initial property values of the object.

  Property

  Initial value

  A null reference (Nothing in Visual Basic)

  An empty object

  Initializes a new instance of the class with the specified search filter.

  The search filter string in Lightweight Directory Access Protocol (LDAP) format. The property is initialized to this value.
- Constructor

  The following table shows the initial property values of the object.

  Property

  Initial value

  An empty object.

  Initializes a new instance of the class with the specified search root and search filter.

  The node in the Active Directory Domain Services hierarchy where the search starts. The property is initialized to this value.
  The search filter string in Lightweight Directory Access Protocol (LDAP) format. The property is initialized to this value.
- Constructor

  The following table shows the initial property values of the object.

  Property

  Initial value

  A null reference (Nothing in Visual Basic)

  Initializes a new instance of the class with the specified search filter and properties to retrieve.

  The search filter string in Lightweight Directory Access Protocol (LDAP) format. The property is initialized to this value.
  The set of properties to retrieve during the search. The property is initialized to this value.
- Constructor

  The following table shows the initial property values of the object.

  Property

  Initial value

  Initializes a new instance of the class with the specified search root, search filter, and properties to retrieve..

  The node in the Active Directory Domain Services hierarchy where the search starts. The property is initialized to this value.
  The search filter string in Lightweight Directory Access Protocol (LDAP) format. The property is initialized to this value.
  The set of properties that are retrieved during the search. The property is initialized to this value.
- Constructor

  The following table shows the initial property values of the object.

  Property

  Initial value

  A null reference (Nothing in Visual Basic)

  Initializes a new instance of the class with the specified search filter, properties to retrieve, and search scope.

  The search filter string in Lightweight Directory Access Protocol (LDAP) format. The property is initialized to this value.
  The set of properties to retrieve during the search. The property is initialized to this value.
  The scope of the search that is observed by the server. The property is initialized to this value.
- Constructor
  To be added.

  Initializes a new instance of the class with the specified search root, search filter, properties to retrieve, and search scope.

  The node in the Active Directory Domain Services hierarchy where the search starts. The property is initialized to this value.
  The search filter string in Lightweight Directory Access Protocol (LDAP) format. The property is initialized to this value.
  The set of properties to retrieve during the search. The property is initialized to this value.
  The scope of the search that is observed by the server. The property is initialized to this value.
- Method
  System.DirectoryServices.SearchResult

  If more than one entry is found during the search, only the first entry is returned. If no entries are found to match the search criteria, a null reference (Nothing in Visual Basic) is returned.

  Executes the search and returns only the first entry that is found.

  A object that contains the first entry that is found during the search.

- Method
  System.DirectoryServices.SearchResultCollection

  Due to implementation restrictions, the class cannot release all of its unmanaged resources when it is garbage collected. To prevent a memory leak, you must call the method when the object is no longer needed.

  Executes the search and returns a collection of the entries that are found.

  A object that contains the results of the search.

- Property
  System.ComponentModel.DefaultValue(Value=True)
  System.DirectoryServices.DSDescription(Description="The cacheability of results.")
  System.Boolean To be added.

  If the search returns a large result set, the search will be more efficient if this property is set to false to avoid the transfer of the result set to the client computer. If you do so, however, you will not be able to enumerate the results twice, because the object creates a new enumerator object each time it is called.

  Gets or sets a value indicating whether the result is cached on the client computer.

- Property
  System.DirectoryServices.DSDescription(Description="The maximum amount of time that the client waits for the server to return results.")
  System.TimeSpan To be added.

  The minimum resolution of this property is one second. Fractions of seconds are ignored.

  If the is reached before the client times out, the server returns its results and the client stops waiting. The maximum server time limit is 120 seconds.

  Gets or sets the maximum amount of time that the client waits for the server to return results. If the server does not respond within this time, the search is aborted and no results are returned.

- Property
  System.ComponentModel.TypeConverter(ConverterTypeName="System.Diagnostics.Design.StringValueConverter, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.ComponentModel.RecommendedAsConfigurable(RecommendedAsConfigurable=True)
  System.ComponentModel.DefaultValue(Value="(objectClass=*)")
  System.DirectoryServices.DSDescription(Description="The Lightweight Directory Access Protocol (Ldap) format filter string.")
  System.String To be added.

  The filter uses the following guidelines:

  The string must be enclosed in parentheses.

  Expressions can use the relational operators: <, <=, =, >=, and >. An example is "(objectClass=user)". Another example is "(lastName>=Davis)".

  Compound expressions are formed with the prefix operators & and |. An example is "(&(objectClass=user)(lastName= Davis))". Another example is "(&(objectClass=printer)(|(building=42)(building=43)))".

  When the filter contains an attribute of ADS_UTC_TIME type, its value must be of the yyyymmddhhmmssZ format where y, m, d, h, m, and s stand for year, month, day, hour, minute, and second, respectively. The seconds (ss) value is optional. The final letter Z means there is no time differential. In this format, "10:20:00 A.M. May 13, 1999" becomes "19990513102000Z". Note that Active Directory Domain Services stores date and time as Coordinated Universal Time (Greenwich Mean Time). If you specify a time with no time differential, you are specifying the time in GMT time.

  If you are not in the Coordinated Universal Time time zone, you can add a differential value to the Coordinated Universal Time (instead of specifying Z) to specify a time according to your time zone. The differential is based on the following: differential = Coordinated Universal Time- Local. To specify a differential, use the following format: yyyymmddhhmmss[+/-]hhmm. For example, "8:52:58 P.M. March 23, 1999" New Zealand Standard Time (the differential is 12 hours) is specified as "19990323205258.0+1200".

  For more information about the LDAP search string format, see "Search Filter Syntax" in the MSDN Library at http://msdn.microsoft.com/library.

  Gets or sets a value indicating the Lightweight Directory Access Protocol (LDAP) format filter string.

- Property
  System.ComponentModel.DefaultValue(Value=0)
  System.DirectoryServices.DSDescription(Description="The page size in a paged search.")
  System.Int32 To be added.

  After the server has found the number of objects that are specified by the property, it will stop searching and return the results to the client. When the client requests more data, the server will restart the search where it left off.

  Gets or sets a value indicating the page size in a paged search.

- Property
  System.ComponentModel.Editor(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="System.Windows.Forms.Design.StringCollectionEditor, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.ComponentModel.DesignerSerializationVisibility(Visibility=System.ComponentModel.DesignerSerializationVisibility.Content)
  System.DirectoryServices.DSDescription(Description="The set of properties retrieved during the search.")
  System.Collections.Specialized.StringCollection To be added.

  To retrieve specific properties, add them to this collection before you begin the search. For example, searcher.PropertiesToLoad.Add("phone"); will add the phone property to the list of properties to retrieve in the search.

  The property "ADsPath" is always retrieved during the search. On Win2kFamily and earlier operating systems, the account that performs the search must be a member of the Administrators group to retrieve the ntSecurityDescriptor property. If this is not the case, the property value that is returned for ntSecurityDescriptor will be null. For more information, see the topic "NT-Security-Descriptor" in the MSDN Library at http://msdn.microsoft.com/library.

  Gets a value indicating the list of properties to retrieve during the search.

- Property
  System.ComponentModel.DefaultValue(Value=False)
  System.DirectoryServices.DSDescription(Description="A value indicating whether the search retrieves only the names of attributes to which values have been assigned.")
  System.Boolean To be added. To be added.

  Gets or sets a value indicating whether the search retrieves only the names of attributes to which values have been assigned.

- Property
  System.ComponentModel.DefaultValue(Value=1)
  System.DirectoryServices.DSDescription(Description="How referrals are chased.")
  System.DirectoryServices.ReferralChasingOption To be added.

  If the root search is not specified in the naming context of the server or when the search results cross a naming context (for example, when you have child domains and search in the parent domain), the server sends a referral message to the client that the client can either ignore or chase.

  Gets or sets a value indicating how referrals are chased.

- Property
  System.ComponentModel.DefaultValue(Value=null)
  System.DirectoryServices.DSDescription(Description="The node in the Ldap Directory hierarchy where the search starts.")
  System.DirectoryServices.DirectoryEntry To be added.

  If is a null reference (Nothing in Visual Basic), the search root is set to the root of the domain that your server is currently using.

  There are several ways to search in the global catalog:

  Enumerate the global catalog and pick the first child.

  Specify the server name. Use the DsGetDcName function to find the global catalog. For more information on the DsGetDcName function, see the topic "DsGetDcName" in the MSDN Library at http://msdn.microsoft.com/library.

  Get the RootDSE of the global catalog and ask for "rootNamingContext".

  Use the global catalog, specifying a search path as if using LDAP. For example, "GC://OU=..., DC=..., DC=...".

  The following C# code shows how to enumerate the global catalog and pick the first child.

  `DirectoryEntry entry = new DirectoryEntry("GC://forestname"); IEnumerator ie = entry.Children.GetEnumerator(); ie.MoveNext(); entry = (DirectoryEntry)ie.Current; DirectorySearcher search = new DirectorySearcher(entry);`

  Gets or sets a value indicating the node in the Active Directory Domain Services hierarchy where the search starts.

- Property
  System.ComponentModel.RecommendedAsConfigurable(RecommendedAsConfigurable=True)
  System.ComponentModel.DefaultValue(Value=2)
  System.DirectoryServices.DSDescription(Description="The scope of the search that is observed by the server.")
  System.DirectoryServices.SearchScope To be added. To be added.

  Gets or sets a value indicating the scope of the search that is observed by the server.

- Property
  System.DirectoryServices.DSDescription(Description="The time limit the server should observe to search an individual page of results.")
  System.TimeSpan To be added.

  The minimum resolution of this property is one second. Fractions of seconds are ignored.

  When the time limit is reached, the server stops searching and returns the results that have accumulated up to that point, along with a cookie containing the information about where to resume searching.

  This property only applies to searches where is set to a value that is not the default of -1.

  Gets or sets a value indicating the maximum amount of time the server should search for an individual page of results. This is not the same as the time limit for the entire search.

- Property
  System.DirectoryServices.DSDescription(Description="The time limit the server should observe to search.")
  System.TimeSpan To be added.

  The minimum resolution of this property is one second. Fractions of seconds are ignored.

  Unlike the property, the property indicates the total amount of time that the server will spend on a search. When the time limit is reached, the server stops searching and returns the results that have accumulated up to that point.

  Set to -1 second to use the server-determined default.

  If you set to a value that is larger than the server-determined default of 120 seconds, the server-determined default is used. After the server time limit is reached, you cannot continue a search from where it left off.

  The property gets or sets a value indicating the maximum amount of time the server spends searching. If the time limit is reached, only entries that are found up to that point are returned.

- Property
  System.ComponentModel.DefaultValue(Value=0)
  System.DirectoryServices.DSDescription(Description="The maximum number of objects the server returns in a search.")
  System.Int32 To be added.

  The server stops searching after the size limit is reached and returns the results accumulated up to that point.

  If you set to a value that is larger than the server-determined default of 1000 entries, the server-determined default is used.

  Gets or sets a value indicating the maximum number of objects that the server returns in a search.

- Property
  System.ComponentModel.TypeConverter(ConverterTypeName="System.ComponentModel.ExpandableObjectConverter, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")
  System.ComponentModel.DesignerSerializationVisibility(Visibility=System.ComponentModel.DesignerSerializationVisibility.Content)
  System.DirectoryServices.DSDescription(Description="An object that defines how the data should be sorted.")
  System.DirectoryServices.SortOption To be added. To be added.

  Gets or sets a value indicating the property on which the results are sorted.

Use a object to search and perform queries against an Active Directory Domain Services hierarchy using Lightweight Directory Access Protocol (LDAP). LDAP is the only system-supplied Active Directory Service Interfaces (ADSI) provider that supports directory searching. An administrator can make, alter, and delete objects that are found in the hierarchy. For more information, see Using System.DirectoryServices.

When you create an instance of , you specify the root you want to retrieve, and an optional list of properties to retrieve. The property enables you to set additional properties to do the following tasks:

Cache the search results on the local computer. Set the property to true to store directory information on the local computer. Updates are made to this local cache and committed to Active Directory Domain Services only when the method is called.

Specify the length of time to search, using the property.

Retrieve attribute names only. Set the property to true to retrieve only the names of attributes to which values have been assigned.

Perform a paged search. Set the property to specify the maximum number of objects that are returned in a paged search. If you do not want to perform a paged search, set the property to its default of zero.

Specify the maximum number of entries to return, using the property. If you set the property to its default of zero, the server-determined default is 1000 entries.

If the maximum number of returned entries and time limits exceed the limitations that are set on the server, the server settings override the component settings.

For a list of initial property values for an instance of the class, see the constructor.

It is assumed that you have a general understanding of Active Directory Domain Services before using this class. For more information, see the overview.

Performs queries against Active Directory Domain Services.