DirectoryServices.DirectoryEntry : DirectoryEntry « File Directory « ASP.Net






DirectoryServices.DirectoryEntry

<%@ Page %>
<script Language="vb" runat="server">
Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
    Dim Entry As System.DirectoryServices.DirectoryEntry

    Try
    Entry = New System.DirectoryServices.DirectoryEntry("WinNT://DomainName")
    Catch
        'Error message

    Finally
        Entry.Close()
    End Try
End Sub
</script>

 








Related examples in the same category

1.DirectoryEntry("LDAP://DomainName", Login, Password)
2.DirectoryEntry("LDAP://CN=Username, CN=users, DC=DomainName")