W
Wake-Up-Jeff
I am trying to get my asp.net code to modify the comment property of the
user object in AD.
The idea is that an AD user accesses the web page.
The user's credentials are used to access the user object and modify their
own comment field.
I don't want to use a single domain account to do this for all users. Each
user can do it for themselves.
I get the "table does not exist" error when calling the following code:
con = CreateObject("ADODB.Connection")
con.provider = "ADsDSOObject"
con.open("Active Directory Provider")
com = CreateObject("ADODB.Command")
com.ActiveConnection = con
strQuery = "Select distinguishedName from 'LDAP://" & strDomain & "'" & _
" Where objectCategory = 'Person' AND objectClass='user' AND
samAccountName='" & strUserID & "'"
com.commandtext = strQuery
RS = com.Execute
the error occurs on com.Execute.
I have read about impersonation, and have attempted to set this up, but I
obviously haven't got something correct yet.
The authentication for my virtual directory has Integrated Windows
Authentication checked, and no other options checked.
My web.config file has the following entries:
<authentication mode="Windows"/>
<identity impersonate ="true"/>
I have the computer account on which IIS is running as "Trusted for
delegation". It is running W2K3 R2. The domain and forest are both at W2K3
functional level.
Any hints????
user object in AD.
The idea is that an AD user accesses the web page.
The user's credentials are used to access the user object and modify their
own comment field.
I don't want to use a single domain account to do this for all users. Each
user can do it for themselves.
I get the "table does not exist" error when calling the following code:
con = CreateObject("ADODB.Connection")
con.provider = "ADsDSOObject"
con.open("Active Directory Provider")
com = CreateObject("ADODB.Command")
com.ActiveConnection = con
strQuery = "Select distinguishedName from 'LDAP://" & strDomain & "'" & _
" Where objectCategory = 'Person' AND objectClass='user' AND
samAccountName='" & strUserID & "'"
com.commandtext = strQuery
RS = com.Execute
the error occurs on com.Execute.
I have read about impersonation, and have attempted to set this up, but I
obviously haven't got something correct yet.
The authentication for my virtual directory has Integrated Windows
Authentication checked, and no other options checked.
My web.config file has the following entries:
<authentication mode="Windows"/>
<identity impersonate ="true"/>
I have the computer account on which IIS is running as "Trusted for
delegation". It is running W2K3 R2. The domain and forest are both at W2K3
functional level.
Any hints????