ANIL BABU Mandla
asked on
LDAP Query : 80040e37|Table_does_not_exist.
LDAP Query : Table does not exist.
Hi all : thanks for taking the time to read my question. I need some assistance with a strange LDAP issue.
ERROR: |80040e37|Table_does_not_e xist.
We have ldap accessing code in the following format, Some times it's working,but is producing errors like above ERROR
This code working Some times and sometimes i am getting the error like below
ERROR: |80040e37|Table_does_not_e xist.
Could you please help me any mistake in my code?
Hi all : thanks for taking the time to read my question. I need some assistance with a strange LDAP issue.
ERROR: |80040e37|Table_does_not_e
We have ldap accessing code in the following format, Some times it's working,but is producing errors like above ERROR
Dim objRootDSE, objCon, objCmd, objRecordSet
Dim strDomainAdsPath
Dim arrMembers
Dim intCount
Dim strmember,strLoggedInUser, strUserStrId, strUserId,blnIsMemberOf, strDomPath,name
response.write strUser + "<BR/>"
Dim ServiceRequest
Dim MagicTicket
ServiceRequest=Request.QueryString("SR")
MagicTicket=Request.QueryString("MT")
Dim strPassword, strQuery, oConn, cmd, oRS, Dom, mail,strUsername,firstname,lastname,fullname,URL,PathSAP
strUserId=""
EMEAUSERNAME = ""
EMEAPASSWORD = ""
Dom="emea"
Set objRootDSE = GetObject("LDAP://RootDSE")
strDomainAdsPath = "LDAP://" & objRootDSE.Get("defaultNamingContext")
response.write strDomainAdsPath + "<BR/>"
strDomPath=objRootDSE.Get("defaultNamingContext")
Set objRootDSE = Nothing
Set objCon = Server.CreateObject("ADODB.Connection")
objCon.Provider = "ADsDSOObject"
objCon.Open "ADProvider", EMEAUSERNAME, EMEAPASSWORD
Set objCmd = Server.CreateObject("ADODB.Command")
Set objCmd.ActiveConnection = objCon
'objCmd.CommandText = "Select name,mail,UserPrincipalName from '" & strDomainAdsPath & "' where objectClass='user' and UserPrincipalName ='" & strUserfull & "'"
objCmd.CommandText = "Select name,mail,UserPrincipalName from '" & strDomainAdsPath & "' where objectClass='user' and sAMAccountName ='" & strUser & "'"
Set objRecordSet = objCmd.Execute
This code working Some times and sometimes i am getting the error like below
ERROR: |80040e37|Table_does_not_e
Could you please help me any mistake in my code?
What line number in the code above is getting the error and what parameters are passed when it works and when it does not?
ASKER
I am geeting the error this line is : Set objRecordSet = objCmd.Execute
I find the error in Log file is : 80040e37|Table_does_not_ex ist
Same code it's working some times and not working some times.
Please see the error i am getting below screen shot
objCmd.CommandText = "Select name,mail,UserPrincipalNam e from '" & strDomainAdsPath & "' where objectClass='user' and sAMAccountName ='" & strUser & "'"
Anything wrong in the above cselect query?
I find the error in Log file is : 80040e37|Table_does_not_ex
Same code it's working some times and not working some times.
Please see the error i am getting below screen shot
objCmd.CommandText = "Select name,mail,UserPrincipalNam
Anything wrong in the above cselect query?
What line number in the code above (the code you posted in your question) is getting the error?
What parameters are passed when it works and when it does not?
The error in your screen shows reads, "A more secure authentication method is required for this server". This is different than table does not exist. This article https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/domain-controller-ldap-server-signing-requirements talks about, "If you set the server to Require signature, you must also set the client device. Not setting the client device results in loss of connection with the server."
What parameters are passed when it works and when it does not?
The error in your screen shows reads, "A more secure authentication method is required for this server". This is different than table does not exist. This article https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/domain-controller-ldap-server-signing-requirements talks about, "If you set the server to Require signature, you must also set the client device. Not setting the client device results in loss of connection with the server."
ASKER
Thanks for replaying.
I am getting the error after select statement ie: Set objRecordSet = objCmd.Execute
Actually below is the my total code
Without changing the code it's working good some times.
i don't no whats happening :)
I am getting the error after select statement ie: Set objRecordSet = objCmd.Execute
Actually below is the my total code
<%@ Language=VBScript %>
<html>
<head>
</head>
<body>
<%
Dim strLogonUser, strUser, Username, actualdomainn
strLogonUser = split(Request.ServerVariables("LOGON_USER"),"\")
strUser = lcase(strLogonUser(1))
'strUser = "XXXXX"
actualdomainn = lcase(strLogonUser(0))
strUserfull = strUser +"@"+actualdomainn +".adsint.biz"
response.write strUser + "<BR/>"
Dim objRootDSE, objCon, objCmd, objRecordSet
Dim strDomainAdsPath
Dim arrMembers
Dim intCount
Dim strmember,strLoggedInUser, strUserStrId, strUserId,blnIsMemberOf, strDomPath,name
response.write strUser + "<BR/>"
Dim ServiceRequest
Dim MagicTicket
ServiceRequest=Request.QueryString("SR")
MagicTicket=Request.QueryString("MT")
Dim strPassword, strQuery, oConn, cmd, oRS, Dom, mail,strUsername,firstname,lastname,fullname,URL,PathSAP
strUserId="XXXXX"
EMEAUSERNAME = "XXXXX"
EMEAPASSWORD = "XXXXX"
Dom="emea"
Set objRootDSE = GetObject("LDAP://RootDSE")
strDomainAdsPath = "LDAP://" & objRootDSE.Get("defaultNamingContext")
response.write strDomainAdsPath + "<BR/>"
strDomPath=objRootDSE.Get("defaultNamingContext")
Set objRootDSE = Nothing
Set objCon = Server.CreateObject("ADODB.Connection")
objCon.Provider = "ADsDSOObject"
objCon.Open "ADProvider", EMEAUSERNAME, EMEAPASSWORD
Set objCmd = Server.CreateObject("ADODB.Command")
Set objCmd.ActiveConnection = objCon
objCmd.CommandText = "Select name,mail,UserPrincipalName from '" & strDomainAdsPath & "' where objectClass='user' and sAMAccountName ='" & strUser & "'"
Set objRecordSet = objCmd.Execute
Response.write objRecordSet.recordcount
objRecordSet.MoveFirst
'Response.write objRecordSet.recordcount
'Name=objRecordSet.Fields("DN").value
Username=objRecordSet.Fields("UserPrincipalName").value
mail=objRecordSet.Fields("mail").value
name=objRecordSet.Fields("name").value
'response.write mail
'response.write name
fullname=Split(name,",")
firstname=fullname(0)
lastname=fullname(1)
'response.write firstname
'response.write lastname
dim domainname
domainname=Split(strDomainAdsPath,"=")
dim d
d=domainname(1)
'response.write d
dim domainn
domainn=Split(d,",")
dim actualdomain
actualdomain=domainn(0)
'response.write actualdomain
PathSAP="http://localhost/default.asp?counter=1"
URL=PathSAP + "&emailid=" + mail +"&SR=" + ServiceRequest +"&Domain=" + actualdomainn +"&MT=" + MagicTicket
'response.write PathSAP
'response.write URL
Response.Redirect(URL)
'response.write strDomainAdsPath
objCon.Close
Set objRecordSet = Nothing
Set objCon = Nothing
%>
</body>
</html>
Without changing the code it's working good some times.
i don't no whats happening :)
Does it depend on whether you are logged on as developer or administrator/ powerusers? Or someone with elevated access rights on this AD?.
AD environments require a Kerberos authentication.
AD environments require a Kerberos authentication.
The connection appears to be made over LDAP, is it possible that some Domain Controllers are requiring LDAPS ?
@noci, LDAP connections to AD do not always require kerberos, but it can be configured to require signed connections http://go.microsoft.com/fwlink/?LinkID=87923
@noci, LDAP connections to AD do not always require kerberos, but it can be configured to require signed connections http://go.microsoft.com/fwlink/?LinkID=87923
ASKER
Some times working means here is EMEA\user domain working.
Some times not working means here is AP\user domain not working.
Previously it's working ,Last one week on-words not working.
I am using the Windows Server 2008.
Any reason for this ?
I am believing that there is no mistake in Code(because it's working last week also)?
I find the logs in log file it's showing the error is :|44|80040e37|Table_does_n ot_exist. 80 AM\userid
I am unable to find out the where the issue exactly?
Please any one help me.
Thanks
Some times not working means here is AP\user domain not working.
Previously it's working ,Last one week on-words not working.
I am using the Windows Server 2008.
Any reason for this ?
I am believing that there is no mistake in Code(because it's working last week also)?
I find the logs in log file it's showing the error is :|44|80040e37|Table_does_n
I am unable to find out the where the issue exactly?
Please any one help me.
Thanks
ASKER
Any other way to get after login user we need to the username ,Domain name etc like above code instead of LDAP?
Please help me?
Please help me?
You create an SQL query on ADODB select Column1,Column2 from TABLE where condition.
TABLE - is the table where the error is about... So can it be the result of the previous failure to obtain the table name .
This fragment would then deliver the wrong name....
Set objRootDSE = GetObject("LDAP://RootDSE" )
strDomainAdsPath = "LDAP://" & objRootDSE.Get("defaultNam ingContext ")
@ArneLovius; if the error is about insufficient privileges then unauthenticated questions won't cut it IMHO.
TABLE - is the table where the error is about... So can it be the result of the previous failure to obtain the table name .
This fragment would then deliver the wrong name....
Set objRootDSE = GetObject("LDAP://RootDSE"
strDomainAdsPath = "LDAP://" & objRootDSE.Get("defaultNam
@ArneLovius; if the error is about insufficient privileges then unauthenticated questions won't cut it IMHO.
ASKER
Hi All,
Any one help me on this issue.
Sometimes it's working without changing any code.
I am unable to find out the reason.
Can any one help me about this issue.
Any one help me on this issue.
Sometimes it's working without changing any code.
I am unable to find out the reason.
Can any one help me about this issue.
For table does not exist, test which parameter you are passing for strDomainAdsPath. If it works sometimes and not others, my first guess is you are passing different items to strDomainAdsPath and one of those items is the issue.
ASKER
Thanks for replaying,
Every time i am passing same values for this strDomainAdsPath.
Below are the actual values
strDomainAdsPath ="LDAP://DC=emea,DC=adsint ,DC=biz"
objCmd.CommandText = "SELECT Mail FROM '" &strDomainAdsPath&"' WHERE SAMAccountName = '" & strUser & "'"
Every time i am passing same values for this strDomainAdsPath.
Below are the actual values
strDomainAdsPath ="LDAP://DC=emea,DC=adsint
objCmd.CommandText = "SELECT Mail FROM '" &strDomainAdsPath&"' WHERE SAMAccountName = '" & strUser & "'"
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
ASKER