Monday, September 17, 2007

Search works from a windows application, but not through ASP.NET

If you can connect to Active Directory using a windows app, such as the Softerra browser, but not through ASP.Net, it is often a permissions issue (according to my reading, anyway. I have no actual experiance). It often happens when you are connecting to LDAP annonymously.

To fix this, create a system account that only has read access to active directory. Always pass this username and password when connecting. If you can't do this, these two pages have helpful hints.

LDAP connection FAQ, Forums.ASP.Net, Microsoft's DirectoryServices connection help page. (Most of the problems on these pages can be avoided by connecting with a username and password)

No comments: