Click here to Skip to main content
13,350,289 members (45,582 online)
Click here to Skip to main content
Add your own
alternative version


48 bookmarked
Posted 1 Feb 2004

Dynamically Browse Active Directory Objects

, 1 Feb 2004
Rate this:
Please Sign up or sign in to vote.
A simple program which lets you browse containers of your Active Directory


This tip shows you how to browse your Active Directory using the Simple AD Browser. The Windows Forms project is quite simple. It contains a treeview control for navigating and expanding AD objects and a listview object showing the selected object data. A connection dialog allows you to initially connect to an AD or change connection to another AD. The solution consists of two projects:

  1. the above mentioned Windows Forms project
  2. a class library which handles Active Directory communication

The class library for AD communication, which is called "Simple AD Browser Helpers.dll", has a reference to ADSI (

The ADSI SDK is needed since we need the interfaces IADsPropertyList and IADsPropertyEntry for making sure that Active Directory types, which are unknown to the .NET Framework, are displayed properly.

If you are having trouble compiling the class library "Simple AD Browser Helpers.dll", because the reference "Interop.ActiveDs" or "ActiveDs" was not found, please do the following steps:

  1. Select "Solution Explorer" in Visual Studio
  2. Navigate to & expand the project "Simple AD Browser Helpers"
  3. Right click on references and choose "Add Reference..."
  4. Choose "Browse"
  5. Go to your Windows directory, e.g., C:\Windows\SysWOW64
  6. Select the file "activeds.tlb"
  7. Hit "OK"


  • Initial release 02.02.2004
  • Code rework 05.01.2014 (cleaned up code and added class library for AD communication, added ADSI type conversions)


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Sebastian Sosna
Software Developer (Senior) Ciber Germany
Germany Germany
Sebastian is an consultant who works at Ciber Germany. He engineers software in various languages but loves C# and C. In his past projects he did CAD SAP integration, SharePoint, software design with UML and coordinating fellow developers.

In his free time he likes to build&fly R/C airplanes and take his mountain bike out for a ride.

You may also be interested in...

Comments and Discussions

Questionquery regarding code Pin
Vamshi Mekala13-Feb-13 20:56
memberVamshi Mekala13-Feb-13 20:56 
GeneralMy vote of 4 Pin
SavindraSingh30-Jan-13 3:56
memberSavindraSingh30-Jan-13 3:56 
Generalexcellent Pin
sypatil28-Jul-09 9:04
membersypatil28-Jul-09 9:04 
Questionin web application Pin
omer nauman17-Jul-08 0:35
memberomer nauman17-Jul-08 0:35 
AnswerRe: in web application Pin
Sibster17-Jul-08 5:24
memberSibster17-Jul-08 5:24 
Generalawesome. Pin
omer nauman16-Jul-08 2:26
memberomer nauman16-Jul-08 2:26 
Question? Can I access LDAP of Solaris environment from my Windows Pin
Suranjan Nandi9-Mar-06 4:17
memberSuranjan Nandi9-Mar-06 4:17 
AnswerRe: ? Can I access LDAP of Solaris environment from my Windows Pin
Sibster9-Mar-06 5:14
memberSibster9-Mar-06 5:14 
GeneralLooks wonderful... Pin
fuzzylintman4-Feb-04 5:33
memberfuzzylintman4-Feb-04 5:33 
GeneralRe: Looks wonderful... Pin
Sibster4-Feb-04 23:10
memberSibster4-Feb-04 23:10 
GeneralRe: Looks wonderful... Pin
Anonymous23-Aug-04 22:44
sussAnonymous23-Aug-04 22:44 
GeneralRe: Looks wonderful... Pin
Sibster25-Aug-04 3:08
memberSibster25-Aug-04 3:08 
Hello ...,

well you are looking for a tool that translate C# into VB.Net, right?
Iam asking because you wanted to convert this sample into C#, and the application is written in C#. So no need to convert it Smile | :)

If you want to use some code of this Application in use the ide:

its a fully Development environment that has such features converting
C#-> or>C#

Its for free so no need to worry.
if u have installed and imported my solution just go to "Tools" in SharpDevelop and Convert the class to

Hope this helps
Regards Seb

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.180111.1 | Last Updated 2 Feb 2004
Article Copyright 2004 by Sebastian Sosna
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid