473,320 Members | 2,098 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

In ASP, how to connect to LDAP by not using complete names?

In an ASP page, when I use the OpenDSObject to connect to LDAP, it works
when I use the complete user name.
For example:
If I use "John A Smith" or "Paul B Allen" and set strUserName = "cn=John A
Smith,ou=medel,o=uniba", the user is authenticated succesfully.

If I use "JSmith" or "PAllen" and set strUserName =
"cn=JSmith,ou=medel,o=uniba", I got an error '8007052e'.

Is this right ? Is there a way to NOT use the complete name ?
Thank you very much.

This is my ASP page:

strADsPath = "LDAP://LDAP"
if (not strADsPath= "") then
' bind to the ADSI object and authenticate Username and password
set oADsNamespace = GetObject("LDAP:")
Set oADsObject = oADsNamespace.OpenDSObject(strADsPath, strUserName,
strPassword, 0)
if not (Err.number = 0) then
Response.Write "Failed to bind to object " & strADsPath
Response.write err.number & ":" & err.description
Else
Response.Write "USER AUTHENTICATED!"
Response.Write "Currently viewing object at " & oADsObject.ADsPath
Response.Write "UserName is " & oADsObject.Name
end if
end if
Jul 19 '05 #1
0 1376

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Luca Bighi | last post by:
I try to use ldap-star-tls to connect to a win2003 domain controller and browse AD. $ds = ldap_connect("ldap://$ad_server/") ,"389"); // Connect to an LDAP server echo $debug?"<BR>LDAP...
1
by: jdelimon | last post by:
Hello I use the following code to connect to an openldap server This works just fine _deRoot = new DirectoryEntry "LDAP://ws244501.test.com/ou=People,dc=test,dc=com”...
10
by: Frank Hauptlorenz | last post by:
Hello, I have a Client (DB2 V7.2 Fix 11 Server Fix 11) both on Windows 2000. After the installation of new software the user (normal user) can no more connect to db2. In the db2 log there are...
1
by: missoula | last post by:
Hello- I can connect to my own domain fine with the following: entry = new DirectoryEntry("LDAP://RootDSE"); However, I am trying to get information out of AD for another domain. This...
3
by: mrwoopey | last post by:
Hi, I am using the example "Authenticate against the Active Directory by Using Forms Authentication and Visual Basic .NET": http://support.microsoft.com/default.aspx?scid=KB;EN-US;326340 ...
7
by: Sync Walantaji | last post by:
Hi, I would like to write a asp.net winform program to authenticate users on Active Directory. Can I do this with asp.net if the IIS server is not part of the Active directory domain? Is...
0
by: RTT | last post by:
here is my current situation. I develop a program on my computer's localhost. From there i contact Active directory succesfull using a connectionstring like:...
4
by: Terry Miller | last post by:
I have DB2 V8.2 loaded on a Redhat Enterprise Linux version 3 (RHEL 3) box. RHEL is configured to talk to LDAP for authenticaton besides the local passwd file. I can verify this by executing an su...
3
by: yawnmoth | last post by:
I'm trying to connect to an Active Directory server and am having some difficulties. Here's the code I'm using: <?php if (!($ldap = ldap_connect('domain.tld')) { exit('unable to connect'); }...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shllpp 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.