2004.11.02 02:27 AM

ADSI LDAP Query Credentials Problem

Had a weird problem tonight after deploying a web app to a test-stage server. A page that performs an active directory LDAP query via ADSI using OLEDB, and which has been working fine on my local dev machine for weeks, started reporting a "permission denied" error when accessed via the test server.

The thing that threw me is that the query doesn't rely on Windows authentication (NTLM, or whatever) - it provides explicit credentials in the ADO connection object's "user id" and "password" properties.

After checking out some things (MDAC verisons, etc.), I discovered that the problem was with the credentials. When run from the server, the connection object's "user id" property has to be qualified with the target domain, as in "domain\userid".

So how did it ever work from my dev machine?


Fyi, I'm running WinXP, am not logged in to the domain, and my machine is not configured to reside on the domain. The server is Win2K, is running the web app as an isolated COM+ component using the local IWAM account, and is also not configured to reside on the domain.



TrackBack URL:  https://www.typepad.com/services/trackback/6a00d8341c7bd453ef00d8353f8c5569e2

Listed below are links to weblogs that reference ADSI LDAP Query Credentials Problem: