RhythmAddict112
Programmer
Hi all.
I realize there are tons of threads on here on LDAP and ASP working...But I still have not found a resolution to my problem so I am spawning another. In short, I receive the table does not exist error. I have done the following:
- ensured ADSI is installed (it is)
- turned on clear text/basic auth
- tried this is integrated windows authentiation on and off
- tried this with anonyomous on and off
I'm not really sure what else it could be. Even more troubling is this,
If I put it my code (which is below) on our old server, it works fine. On my dev server, it does not function only returns this error:
Error Type:
Provider (0x80040E37)
Table does not exist.
/test3.asp, line 15
my code:
I realize there are tons of threads on here on LDAP and ASP working...But I still have not found a resolution to my problem so I am spawning another. In short, I receive the table does not exist error. I have done the following:
- ensured ADSI is installed (it is)
- turned on clear text/basic auth
- tried this is integrated windows authentiation on and off
- tried this with anonyomous on and off
I'm not really sure what else it could be. Even more troubling is this,
If I put it my code (which is below) on our old server, it works fine. On my dev server, it does not function only returns this error:
Error Type:
Provider (0x80040E37)
Table does not exist.
/test3.asp, line 15
my code:
Code:
<%@ Language=VBScript %>
<%
Function xdirlookup(uid, fld)
Dim conn, cmd, rs, i
Set conn = CreateObject("ADODB.Connection")
Set cmd = CreateObject("ADODB.Command")
conn.Provider = "ADSDSOObject"
conn.Open "Active Directory Provider","DC=DOMAIN,CN=USERNAME","PASSWORD"
Set cmd.ActiveConnection = conn
cmd.CommandText = "<LDAP://SERVER_NAME>;(&(objectClass=organizationalPerson)(uid=" & uid & "));uid,sn,givenName,mail;subtree"
Set rs = cmd.Execute
If (Not (rs.EOF And rs.BOF)) Then
xdirlookup = rs.Fields(fld).Value
End If
End Function
Dim UserID, iLength, UserName, ReqEmail, ReqName, ApprID, ApprName, CommentFld, ReqInfo
iLength = Len(Trim(Request.ServerVariables ("AUTH_USER"))) - instrrev(Trim(Request.ServerVariables ("AUTH_USER")),"\")
UserID = Right(Trim(Request.ServerVariables ("AUTH_USER")), iLength)
response.write "userid: " & userid & "<BR>"
UserName = xdirlookup(UserID,1)
response.write "<br>"
response.write "username: " & username
%>