Subscribe to Sergio Tapia - Lost in the GC.        RSS Feed
-----

SharpDirectory - Interact with Active Directory using C#.

Icon 2 Comments
Project Link:
https://github.com/s.../SharpDirectory

Download the compiled .dll file: http://rapidshare.co...rpDirectory.dll

Usage:
//Example 1: Find all users in Active Directory.            
string ldapConnection = @"LDAP://server1/dc=exgrado,dc=biz";
string username = "Administrador";
string password = String.Empty;

UserSearcher userSearcher = new UserSearcher(ldapConnection, username, password);
try
{
    var users = userSearcher.FindAllUsers();

    foreach (var user in users)
    {
        Console.WriteLine(user.Name);
        Console.WriteLine(user.Path);
    }
}
catch (Exception e)
{
    Console.WriteLine(e.Message);
}




What is SharpDirectory?
SharpDirectory is a library that lets developers easily and intuitively interact with Active Directory resources.

It uses the System.DirectoryServices class and so far allows you to:

  • Get a list of all Organizational Units in a domain.
  • Get a list of all users in a domain.
  • Create users in a particular path in Active Directory.


This is very early stage (only worked on it for about 7 hours) but I'll add functionality as it's requested and as I need more things from it.

Ultimately, my goal is to make this library full of features that make things easier on developer who have to work with Active Directory.

Let me know what you think. :D

2 Comments On This Entry

Page 1 of 1

LetMeFinclOut Icon

27 March 2011 - 07:42 AM
Oddly rnough, the ad I got for this pagewas for an Active Directory Manager.

I've just startedf using System.DirectoryServices for my current project, so I'll be interested in seeing hoe this comes along.
1

skorned Icon

27 March 2011 - 10:42 AM

LetMeFinclOut, on 27 March 2011 - 07:42 AM, said:

Oddly rnough, the ad I got for this pagewas for an Active Directory Manager.

I've just startedf using System.DirectoryServices for my current project, so I'll be interested in seeing hoe this comes along.


Not quite that odd. Ad systems do inspect the content of the page to give you relevant ads! I'm guessing the only products relevant to anything Active Directory would probably be AD Managers...
0
Page 1 of 1

Trackbacks for this entry [ Trackback URL ]

There are no Trackbacks for this entry

2 user(s) viewing

2 Guests
0 member(s)
0 anonymous member(s)

About Me

Posted Image


Bienvenidos! I'm a USA ex-pat living in Bolivia for the past 10 years. Web development is my forte with a heavy lean for usability and optimization. I'm fluent in both English and Spanish. I guest write for the popular Python website Python Central. Visit my website.

Categories