i am trying to Authenticate user using LDAP on win2003 from my ASP application.
i always get result as "Failed" when ever i run this code even for existing users.
please correct my code where ever .
ASP -> legacy
FYI, i have another code which works fine and retrieves UserName - Emai l- Phonenumber when Passed userID
for the same LDAP://Domain
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
i changed it to domain\strUser ... still the same error.
when i used "LDAP:\\Mydomain" in some other program to retrieve the user's Email & phone number it worked fine.
dont i have to use any Bind? ..
i would really apprecite ur help
-----below is the sample code that works in different scenario.-----------
sample code which tells i can talk to my LDAP server(Not the problem code but other code which is working to get Email-Phone for a specific User)strBase = "<LDAP://mydomain>" strFilter = "(sAMAccountName=" & strUID & ")" strAttributes = "cn, mail, company, givenName, sn, ADsPath, name, sAMAccountName, telephoneNumber" 'strAttributes = "cn, company, givenName, sn, ADsPath, name, sAMAccountName, telephoneNumber" strScope = "subtree" strFullCommand = strBase & ";" & strFilter & ";" & strAttributes & ";" & strScope set rsADUserInfo = Server.CreateObject("ADODB.Recordset") set rsADUserInfo = connAD.Execute(strFullCommand)
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
Thank you for showing up.
i changed it to domain\strUser ... still the same error.
when i used "LDAP:\\Mydomain" in some other program to retrieve the user's Email & phone number it worked fine.
dont i have to use any Bind? ..
i would really apprecite ur help
-----below is the sample code that works in different scenario.-----------
Open in new window