Question
Thread display: Collapse - |
All Answers
Share your knowledge
Start or search
Create a new discussion
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
Get manager out of LDAP
Using Visual Studio 2005, I am able to get name, title, location, department, and phone number out of LDAP. I am trying to get the current user's manager, but am having trouble getting it.
I am using the following code from Microsoft:
Dim ManagerName As String = personnel.Properties( "manager").Value.ToString()
ManagerName = ManagerName.Substring(3, ManagerName.IndexOf(",") - 3)
I get the following exception:
NullReferenceException was unhandled by user code.
Object reference not set to an instance of an object.
Please help. Thanks