I am using PrincipalContext. I am receiving “The LDAP server is unavailable.” “Cannot be reached”. I am developing from a machine that is not joined to the domain I want to query. Does this matter? Do I need to pass admin creds to connect to AD, so I can query or search it?
My code resembles this:
http://www.codeproject.com/KB/system/usingAccountManagement.aspx
It does matter. But you can get your site access by setting an
<identity>tag in web.config to a user with ldap reading privileges:here’s a msdn