Last post Dec 26, 2006 04:07 PM by jportelas
Dec 26, 2006 04:07 PM|jportelas|LINK
I´ve been reading and writting some code on using the Active Directory technology.
I wrote some code on VB6 using the IADs classes from the "Active DS Type Library" and some code in .NET (1.1) using the "System.DirectoryServices" classes (DirectoryEntry,
I have found that most of the properties exposed in the IADsUser can be directly referenced like this:
oUser.telephoneNumber or oUser.department
while in the .net I have to bring then trough the Get call:
myDirectoryEntry.Properties["givenName"].Value or myDirectoryEntry.Properties["CN"].Value
But sometimes I can´t read some properties in the .net app.
I read in the microsoft´s web site that if a property has no value, then the property doesn´t exist for that entry, is this always like this?
I mean, if some user has no "telephone number" set, then this property will always cause an exception when I query it?
An other question, which approach is better when reading custom properties? the IADs or the .NET DirectoryServices? any good articles on this would be appreciated...
Thanks for any help. a lot of thanks!