Monday, 21 January 2008

Active Directory: Query catalogue 2

Hoping to keep commonly used functions in this solution. The Common project now contains a User and ActiveDirectory object.

The User class returns commonly accessed attributes for a particular user via DirectoryServices.

The ActiveDirectory class contains commonly used functions to access AD. For example:

ConnectToActiveDirectory()
GetActiveDirectoryUser(string)
GetActiveDirectoryUsers()
GetActiveDirectoryUsers(DropDownList)
GetAttributes(Common.User)

It currently contains the connection properties to access AD and this should eventually be moved into a config file. Also a service account would need to be created as it currently uses my login details.

A web front end test harness have been setup as a separate project to test these functions.

Monday, 14 January 2008

Active Directory: Query catalogue

Begin development to enumerate all active users from ERGON's AD to a web front end. ERGON's AD contains nearly 7000 records in the CN - SOE users. This proved extremely slow using DirectoryServices. To enumerate the entire list took 1min10secs. Noticed that if you return 1000 records it took approx 3 seconds. The delay grows exponentially as the number of records increases.

Have discussed this finding with Alton. Proposed we create a subset of the data in AD for users and replicate this to a SQL database to speed up information retrieval. Alton agrees and further suggests he will look into ways of creating a trigger which updates SQL whenever AD is updated.

Spoke to Paul James. Currently the only Energex's GC contains both Ergon and Energex user details. This will eventually needs to be shifted to the SPARQ domain as it makes little sense to keep Ergon users in the Energex's domain. Spoke to Alton about this as well.

*Update*
Changed value for pagesize in directorysearcher. This increased the speed with which data was retrieve from AD. 7000 records are now returned in 4 secs. This is still slow and we will look into the SQL option.

Monday, 7 January 2008

Active Directory: Research

Research into .Net's DirectoryServices namespace and its interaction with ADSI - Active Directory Service Interface. Read up through Safari O'Reilly account (seems to be expired now, I cannot access the full chapter). Recommend this book: The .NET Developer's Guide to Directory Services Programming by Joe Kaplan; Ryan Dunn Begin development of the AD connector that abstracts and return a USER object from AD. This will allow the User object to eventually bind to either an AD or SQL backend.