G
Guest
How do i create a directory entry to access a user's details such as their
email address. Here are the object structure.
domain.co.uk
|
|Computer Services - Type (OU)
|
|Cliff Saran - Type (User)
Cliff Saran's username is csaran, and here is what i am doing but it does
not work.
DirectoryEntry de = new DirectoryEntry("LDAP://CN=csaran,CN=User,
OU=Computer Services,DC=domain,DC=co,DC=uk");
string email = de.Properties["mail"].Value.ToString();
Response.Write(mail);
I get this message: There is no such object on the server
What am i doing wrong? many thanks in advance
email address. Here are the object structure.
domain.co.uk
|
|Computer Services - Type (OU)
|
|Cliff Saran - Type (User)
Cliff Saran's username is csaran, and here is what i am doing but it does
not work.
DirectoryEntry de = new DirectoryEntry("LDAP://CN=csaran,CN=User,
OU=Computer Services,DC=domain,DC=co,DC=uk");
string email = de.Properties["mail"].Value.ToString();
Response.Write(mail);
I get this message: There is no such object on the server
What am i doing wrong? many thanks in advance