Google Answers Logo
View Question
 
Q: Using Sun1 LDAP server and vb.net ( No Answer,   0 Comments )
Question  
Subject: Using Sun1 LDAP server and vb.net
Category: Computers > Programming
Asked by: yaheya-ga
List Price: $10.00
Posted: 01 Sep 2003 14:49 PDT
Expires: 01 Oct 2003 14:49 PDT
Question ID: 251175
We have an LDAP server. All I want to do is to develop a web interface
that will accept a username and password and then authenticate against
our LDAP server. After authenticating I want to retrieve the users
email address. Sounds simple?
Well, stay tuned perhaps not. 

The version of the LDAP that is being used here is Sun1 directory
server formerly known as iplanet directory server. The LDAP is
residing on a Unix platform. I am developing my application using
VB.net and the built in class called directory.services. Below is a
sample code. Note, the address provided are valid. The code below does
not work. I get the following error

Stack Trace ... 


[COMException (0x80005000): Unknown error (0x80005000)] 
System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) +514
System.DirectoryServices.DirectoryEntry.Bind() +10 
System.DirectoryServices.DirectoryEntry.get_AdsObject() +10 
System.DirectoryServices.DirectorySearcher.FindAll(Boolean
findMoreThanOne) +199
System.DirectoryServices.DirectorySearcher.FindAll() +10 
app1.myldap.Page_Load(Object sender, EventArgs e) in C:\Documents and
Settings\yquazi\VSWebCache\xfiles\app1\myldap.aspx.vb:33
System.Web.UI.Control.OnLoad(EventArgs e) +67 
System.Web.UI.Control.LoadRecursive() +35 
System.Web.UI.Page.ProcessRequestMain() +731 

It means the directory does not bind. 



 Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim objsearch As New
DirectoryEntry("ldap://ldap.ucmerced.edu/ou=People, dc=ucmerced,
dc=edu")
objsearch.AuthenticationType = AuthenticationTypes.None
Dim searcher As New DirectorySearcher(objsearch)
searcher.Filter = "uid=*"
searcher.SearchScope = SearchScope.Subtree
searcher.PropertiesToLoad.Add("uid")
Dim mystring As String = searcher.findone.tostring()
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy