Help with LDAP

ny3ranger

Member
Joined
Feb 25, 2005
Messages
5
Programming Experience
1-3
Hi,
I have this problem. I am trying to create a simple winform that will read users in active directory and modify the profile path of users. I am having a hard time reading users. I am probably using the wrong path for LDAP.

My active directory structure is as follows.

my domain is "ffhsj.com"
And then under that I have a folder called "NY"
Inside that I have a folder called "Users and Groups"

I made a test user called testtw and Im trying to read its properties.
I made a simple winform put a label on it to see if I can read its properties

I dragged a DirectoryEntry component onto my visual studio .NET 2003 and put the path

LDAP://uid=testtw,ou=Users and Groups, ou=NY, dc=ffhsj, dc=com

and then in the code.

In form load I have this
Dim User As New System.DirectoryServices.DirectoryEntry(LDAP://uid=testtw,ou=Users and Groups, ou=NY, dc=ffhsj, dc=com)Label1.Text = User.Properties.PropertyNames.Count.ToString

But it seems that I cant read it.

Can anyone help???

Thanks,
Tash
 
Back
Top