Solved

Listing all of the System.DirectoryServices.DirectoryEntry objects properties

Posted on 2004-09-17
2
542 Views
Last Modified: 2008-02-01
Hi,
I'm wondering how to list every single property in a textbox of System.DirectoryServices.DirectoryEntry.Properties. The list only takes a name of a property and further I'm not entirely sure what the property contains. Another list? Thanks for any help.
0
Comment
Question by:xersoft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
mpemberton5 earned 50 total points
ID: 12102004
Are you looking for something like this?

        Dim ldapCommand As String
        ldapCommand = "LDAP://ad/OU=testorg,OU=clients,DC=yourdomain,DC=com"
        Dim de As DirectoryEntry = New DirectoryEntry(ldapCommand)
        Dim obEntry As DirectoryEntry = New DirectoryEntry(ldapCommand)
        Dim srch As DirectorySearcher = New DirectorySearcher(obEntry, "(&(objectClass=user)(samAccountName=" & AccountName & "))")
        Dim rescol As SearchResultCollection = srch.FindAll
        Dim res As SearchResult
        For Each res In rescol

            Dim item As String
            For Each item In res.Properties.PropertyNames
                Response.Write(item.ToString & " - ")
                Response.Write(res.Properties(item.ToString)(0).ToString)
                Response.Write("<BR>")
            Next
            Response.Write("<BR>")
        '''Next
0
 
LVL 5

Author Comment

by:xersoft
ID: 12102137
Properties.PropertyNames ahh I see, don't know why I didn't see that before. But this is perfect. I can look at each property name. Thanks for the help!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question