Freigeben über


Directory Entry Configuration Settings Technology Sample

This sample shows how to get and set directory entry configuration settings using the DirectoryEntryConfiguration class.

NoteNote

This sample uses fictitious values and cannot be run until it is modified with real values.

For information about using the samples, see the following topics:

To customize the sample for your settings

  • Modify the following string variables with real values in the DirEntryConfig.cs or DirEntryConfig.vb file, depending on which version of the sample is being built:

    • domainADsPath - LDAP path to domain

To build the sample

  1. At a command prompt, navigate to the Technologies\DirectoryServices\DirEntryConfig directory. Navigate to the CS or VB directory, depending on which version of the sample is being built. For information about required settings and the SDK command prompt, see How to: Set Sample Settings.

  2. Type msbuild direntryconfig.sln at the command line.

To run the sample

  1. At a command prompt, navigate to the directory that contains the built executable file.

  2. Type direntryconfig and press Enter.

NoteNote

This sample is a console application. You must start and run it at a command prompt window to view its output.

Remarks

This sample lists the following information:

  • Current server name

  • Page size

  • Password encoding and port number

  • Referral

  • Security masks

  • Whether mutual authentication is in effect

  • This sample demonstrates the following tasks:

  • How to create a DirectoryEntry object for the specified path

  • How to get and set properties such as PageSize, Referral, SecurityMasks, PasswordEncoding and PasswordPort in a DirectoryEntryConfiguration object