This is really bizarre....
I'm trying to query LDAP from an ASP page (IIS 5.0 on Win 2K).
Query looks like this:
This works great. However, if I add in the 'department' field, as in:
I get an error 80004005 'Unspecified Error'. I look at the Active Directory schema and department is shown alongside all of the other fields I'm retrieving, and there doesn't appear to be anything unusual about it.
If I write a similar VBS script with the same SQL statement, I can execute it just fine from a command prompt or the desktop -- and it retrieves the department field without any problem. I've run this against several different LDAP servers from several different hosts, and I get the same problems. I've tried changing the security context under which IIS is running, making it a domain user instead of the default IIS user, and that didn't change anything.
Can anybody think of any reason why 'department' would be inaccessible?
Rob Schripsema
Integra Software
I'm trying to query LDAP from an ASP page (IIS 5.0 on Win 2K).
Query looks like this:
Code:
dim adoConnection, sSQL, rs
'the ADserver is on a different machine than is running IIS
const sDomain = "ADServer/dc=mydomain,dc=net"
'' use ADO
Set adoConnection = CreateObject("ADODB.Connection")
adoConnection.Provider = "ADsDSOObject"
adoConnection.Open ""
sSQL = "Select ADsPath, name, distinguishedName, title, mail, telephoneNumber, street, l, st, postalCode, sn, givenName,info from 'LDAP://" & sDomain & "' "
Set rs = adoConnection.Execute(sSQL)
This works great. However, if I add in the 'department' field, as in:
Code:
sSQL = "Select ADsPath, department, name, distinguishedName, title, mail, telephoneNumber, street, l, st, postalCode, sn, givenName,info from 'LDAP://" & sDomain & "' "
I get an error 80004005 'Unspecified Error'. I look at the Active Directory schema and department is shown alongside all of the other fields I'm retrieving, and there doesn't appear to be anything unusual about it.
If I write a similar VBS script with the same SQL statement, I can execute it just fine from a command prompt or the desktop -- and it retrieves the department field without any problem. I've run this against several different LDAP servers from several different hosts, and I get the same problems. I've tried changing the security context under which IIS is running, making it a domain user instead of the default IIS user, and that didn't change anything.
Can anybody think of any reason why 'department' would be inaccessible?
Rob Schripsema
Integra Software