E
Enigma Webmaster
We've had an ASP running for about 9 months which returns a full listing of
network users (taken directly from AD), and it has now stopped working with
the following;
Provider Error '80004005'.
If I remove a field called 'userAccountControl' from the field list it works
to a certain extent but still fails further down the code with not finding
content ofr the field called 'Name'. I think its very probably a
permissions error, can someone point out the obvious to me please ???
Regards & thanks in anticipation..
KP
' ------------------------ Create Connection to Active
Directory -----------------------------------------
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
objConn.Provider = "ADsDSOObject"
strConn = "ADs Provider"
objConn.Open strConn
' ------------------------ Create Active Directory SQL Query
String --------------------------------------
if request.querystring("order")="" then
strQuery = "SELECT name, mail, telephonenumber, homephone, mobile,
postalcode, st, title, info, userAccountControl"
strQuery = strquery & "distinguishedName FROM 'LDAP://domain.com' WHERE
objectcategory='user' and "
strQuery = strquery & " objectClass = 'user' AND msExchHomeServerName =
'*cn=ATVMAILSVR' AND name <> 'SystemMailbox*' "
strQuery = strquery & " AND OU <> 'User' AND NOT
msExchhidefromAddresslists=TRUE order by name"
else
strQuery = "SELECT name, mail, telephonenumber, homephone, mobile,
postalcode, st, title, info,"
strQuery = strquery & "distinguishedName FROM 'LDAP://domain.comWHERE
objectcategory='person' and "
strQuery = strquery & " objectClass = 'user' AND msExchHomeServerName =
'*cn=ATVMAILSVR' AND name <> 'SystemMailbox*' "
strQuery = strquery & " AND OU <> 'User' AND NOT
msExchhidefromAddresslists=TRUE order by " & request.querystring("order")
end if
' ------------------------ Open Recordset & populate various
counters ------------------------------------
objRS.Open strQuery, objConn, 1, 1
intRowCount = objrs.recordcount
objrs.MoveFirst
' ------------------------ loop through recordset and display
details ------------------------------------
network users (taken directly from AD), and it has now stopped working with
the following;
Provider Error '80004005'.
If I remove a field called 'userAccountControl' from the field list it works
to a certain extent but still fails further down the code with not finding
content ofr the field called 'Name'. I think its very probably a
permissions error, can someone point out the obvious to me please ???
Regards & thanks in anticipation..
KP
' ------------------------ Create Connection to Active
Directory -----------------------------------------
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
objConn.Provider = "ADsDSOObject"
strConn = "ADs Provider"
objConn.Open strConn
' ------------------------ Create Active Directory SQL Query
String --------------------------------------
if request.querystring("order")="" then
strQuery = "SELECT name, mail, telephonenumber, homephone, mobile,
postalcode, st, title, info, userAccountControl"
strQuery = strquery & "distinguishedName FROM 'LDAP://domain.com' WHERE
objectcategory='user' and "
strQuery = strquery & " objectClass = 'user' AND msExchHomeServerName =
'*cn=ATVMAILSVR' AND name <> 'SystemMailbox*' "
strQuery = strquery & " AND OU <> 'User' AND NOT
msExchhidefromAddresslists=TRUE order by name"
else
strQuery = "SELECT name, mail, telephonenumber, homephone, mobile,
postalcode, st, title, info,"
strQuery = strquery & "distinguishedName FROM 'LDAP://domain.comWHERE
objectcategory='person' and "
strQuery = strquery & " objectClass = 'user' AND msExchHomeServerName =
'*cn=ATVMAILSVR' AND name <> 'SystemMailbox*' "
strQuery = strquery & " AND OU <> 'User' AND NOT
msExchhidefromAddresslists=TRUE order by " & request.querystring("order")
end if
' ------------------------ Open Recordset & populate various
counters ------------------------------------
objRS.Open strQuery, objConn, 1, 1
intRowCount = objrs.recordcount
objrs.MoveFirst
' ------------------------ loop through recordset and display
details ------------------------------------