Thanks Ryan. This is for an Intranet, we are using IWA, we are not using Anonymous and everyone is on IE. Not sure what Native Mode is. How would I then use Kerberos for calls to AD.
Read this post on how to setup Kerberos Delegation: 163508 Instead of binding explicitly (i.e. DirectoryEntry(ldapPath, "username", "password")), you would pass null for the username and password (DirectoryEntry(ldapPath, null, null, AuthenticationTypes.Secure)).
This tells the DirectoryEntry to bind with current credentials. Make sure you have added to your web.config.
Thank you very much Ryan, you are right i made a mistake in username definition.i did update successfully. now i want to insert a user, i wrote it like: DirectoryEntry de= new DirectoryEntry(ldapPath); de.AuthenticationType =AuthenticationTypes.None; de.Username
= "uid=Admin,ou=AdmUsers,dc=domain";; de.Password = "Password"; DirectoryEntry child=de.Children.Add("uid=myname","People"); child.Properties["p1"].Value = "p1"; child.Properties["p2"].Value = "p2"; child.CommitChanges() ; i take the message "The requested
operation did not satisfy one or more constraints associated with the class of the object." i dont know where am i wrong?do i have to fill all of the properties define in LDAP setup? in visual basic i used opendsobject for update but in MSDN i found a code
to insert by using "samaacountname". since i did not use AD i dont know what to use to insert in VB? thank you.
In AD, you would need to add a value to the required attribute 'sAMAccountName' before calling CommitChanges(). I don't know the details of your directory, but you need to find the details of the user schema for your LDAP directory. In it, they should specify
which attributes are mandatory; it will be necessary for you to populate them before calling .CommitChanges(). It could be that your directory requires you to set the "CN" attribute or password before trying to save it.
hi can you help me connect to my sun1 directory server for LDAP here is my code and It doesn't work. It fails to bind... Dim objsearch As New DirectoryEntry("ldap://ldap.myldap.edu/ou=People,dc=myldap,dc=edu") Dim searcher As New DirectorySearcher(objsearch)
searcher.Filter = "uid=validuser" searcher.SearchScope = SearchScope.Subtree searcher.PropertiesToLoad.Add("uid") Dim sr As SearchResult = searcher.FindOne Dim mystring As String = sr.Properties("uid")(0).ToString() End Sub Thanks in advance... PS: it allows
anonymous logon so I don't need to pass in username and password
Yaheya Quazi
Director, Admin. Comp. & Systems
University of California, Merced
joee
Participant
1728 Points
377 Posts
Re: userid,password problem with DirectoryEntry
Apr 16, 2003 01:34 PM|LINK
dunnry
Star
9098 Points
1806 Posts
Re: userid,password problem with DirectoryEntry
Apr 16, 2003 01:41 PM|LINK
Weblog
The Book
LDAP Programming Help
oziii
Member
20 Points
4 Posts
Re: userid,password problem with DirectoryEntry
Apr 17, 2003 07:20 AM|LINK
dunnry
Star
9098 Points
1806 Posts
Re: userid,password problem with DirectoryEntry
Apr 17, 2003 01:28 PM|LINK
Weblog
The Book
LDAP Programming Help
yaheya
Participant
1635 Points
340 Posts
Re: userid,password problem with DirectoryEntry
Aug 21, 2003 09:30 PM|LINK
Director, Admin. Comp. & Systems
University of California, Merced