include::../common/rationale.adoc[] == Why is this an issue? include::../common/description.adoc[] === What is the potential impact? include::../common/impact.adoc[] == How to fix it === Code examples include::../common/fix/code-rationale.adoc[] ==== Noncompliant code example [source,csharp,diff-id=1,diff-type=noncompliant] ---- DirectoryEntry myDirectoryEntry = new DirectoryEntry(adPath); myDirectoryEntry.AuthenticationType = AuthenticationTypes.None; // Noncompliant DirectoryEntry myDirectoryEntry = new DirectoryEntry(adPath, "u", "p", AuthenticationTypes.None); // Noncompliant ---- ==== Compliant solution [source,csharp,diff-id=1,diff-type=compliant] ---- DirectoryEntry myDirectoryEntry = new DirectoryEntry(myADSPath); // Compliant; default DirectoryEntry.AuthenticationType property value is "Secure" since .NET Framework 2.0 DirectoryEntry myDirectoryEntry = new DirectoryEntry(myADSPath, "u", "p", AuthenticationTypes.Secure); ---- //=== How does this work? //=== Pitfalls //=== Going the extra mile == Resources //=== Documentation include::../common/resources/documentation.adoc[] //=== Articles & blog posts //=== Conference presentations //=== Standards include::../common/resources/standards.adoc[] //=== Benchmarks ifdef::env-github,rspecator-view[] ''' == Implementation Specification (visible only on this page) include::../message.adoc[] include::../highlighting.adoc[] ''' == Comments And Links (visible only on this page) === on 5 Apr 2018, 12:10:55 Alexandre Gigleux wrote: https://docs.microsoft.com/en-us/dotnet/api/system.directoryservices.directoryentry.authenticationtype?view=netcore-2.0#System_DirectoryServices_DirectoryEntry_AuthenticationType endif::env-github,rspecator-view[]