I wish to access AD via ASP though NT Authentication, but I am having
problems. The following code produces a Provider error '80040e37'. The code
works fine under Anonymous access but when I change to NT Authentication is
fails. I end with with a 'Table does not exist.' error on the last line of
the code. I once heard that you can't access ADSI via NT Authentication on a
web server.
Thanks, John
samAccountName = a valid network id...
========
sub CheckUser(samAccountName)
Dim strUserName
Dim objConnection, objCommand, objRecordSet
Dim objRootDSE, objItem
Dim strAMAccountName
Dim strInfo, strSplit, strAllowIn, strReports
strUserName = samAccountName
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=ADsDSOObject;"
Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection
objCommand.CommandText = "<LDAP://dc=meemic,dc=ins>;(&(objectCategory=User)
(samAccountName=" & strUserName &
"));sAMAccountName,distinguishedName;subtree"
Set objRecordSet = objCommand.Execute
|