DirectoryEntry.DirectoryEntry (String, String, String, AuthenticationTypes)

The DirectoryEntry constructor initializes a new instance of the DirectoryEntry class. The Path, Username, Password, and AuthenticationTypes properties are set to the specified values.

public DirectoryEntry(
  String path,
  String username,
  String password,
  AuthenticationTypes authenticationType
);
Public Sub New( _
  ByVal path As String, _
  ByVal username As String, _
  ByVal password As String, _
  ByVal authenticationType As AuthenticationTypes _
)

Parameters

  • path
    The path of this DirectoryEntry. The Path property is initialized to this value.
  • username
    The user name to use when authenticating the client. The Username property is initialized to this value.
  • password
    The password to use when authenticating the client. The Password property is initialized to this value.
  • authenticationType
    One of the AuthenticationTypes values. The AuthenticationType property is initialized to this value.

Security

Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries From Partially Trusted Code.

Requirements

Client Requires Windows XP Home Edition, Windows XP Professional, Windows Me, or Windows 98.
Server Requires Windows Server 2003, Windows 2000, or Windows NT 4.0.
Namespace

Defined in System.DirectoryServices.

Assembly

Requires System.DirectoryServices (in System.DirectoryServices.dll).

.NET Framework

Requires .NET Framework 1.0.

See Also

AuthenticationType, DirectoryEntry, DirectoryEntry Constructors, Managed Extensions for C++ Programming, Password, Path, System.DirectoryServices Namespace, Username