示例#1
0
 static void DisplayConfigurationEntryConfiguration(DirectoryEntryConfiguration entryConfiguration)
 {
     Console.WriteLine("DISPLAYING DIRECTORY ENTRY CONFIGURATION");
     Console.WriteLine("Server\t\t\t\t" + entryConfiguration.GetCurrentServerName());
     Console.WriteLine("Page Size\t\t\t" + entryConfiguration.PageSize.ToString());
     Console.WriteLine("Password Encoding\t\t" + entryConfiguration.PasswordEncoding.ToString());
     Console.WriteLine("Password Port\t\t\t" + entryConfiguration.PasswordPort.ToString());
     Console.WriteLine("Referral\t\t\t" + entryConfiguration.Referral.ToString());
     Console.WriteLine("Security Masks\t\t\t" + entryConfiguration.SecurityMasks.ToString());
     Console.WriteLine("Is Mutually Authenticated\t" + entryConfiguration.IsMutuallyAuthenticated().ToString());
     Console.WriteLine();
 }
示例#2
0
        public static void DirectoryEntryConfigurationSettings(string domainADsPath)
        {
            // Bind to current domain

            DirectoryEntry entry = new DirectoryEntry("LDAP://192.168.92.200/" + domainADsPath, "contoso\\administrator", "Br@sil01");
            DirectoryEntryConfiguration entryConfiguration = entry.Options;

            Console.WriteLine("Server: " + entryConfiguration.GetCurrentServerName());
            Console.WriteLine("Page Size: " + entryConfiguration.PageSize.ToString());
            Console.WriteLine("Password Encoding: " +
                              entryConfiguration.PasswordEncoding.ToString());
            Console.WriteLine("Password Port: " +
                              entryConfiguration.PasswordPort.ToString());
            Console.WriteLine("Referral: " + entryConfiguration.Referral.ToString());
            Console.WriteLine("Security Masks: " +
                              entryConfiguration.SecurityMasks.ToString());
            Console.WriteLine("Is Mutually Authenticated: " +
                              entryConfiguration.IsMutuallyAuthenticated().ToString());
            Console.WriteLine();
            Console.ReadLine();
        }