Cool Solutions

LDAP Bind Sample Code


October 28, 2002 2:07 pm






Download ldap_bind

LDAP_BIND.ZIP contains three files which demonstrate doing an LDAP bind over SSL using the Novell NWIDirQ ActiveX control. This code has been tested on a Windows 2000 SP2 server running Internet Information Server 5.0 against an eDirectory 8.6.2 tree. The Novell LDAP ActiveX controls must be installed and registered on the server. They can be found at:

No NetWare client is required on the IIS server.

LOGIN.HTML is the login form which prompts for the user’s user ID and password. This form POSTs the results to VERIFY.ASP which performs the LDAP bind and also returns the user’s first and last name.

The GLOBAL.ASA declares the object at the session level as oppose to the page level. This seems to be more efficient and I’ve had less problems with the control doing it this way (you’ll need to look up the class ID in the registry on your server). Up until the current control, there were memory leaks with it that I think contributed to this problem.

I also had a difficult time getting the SSL BIND to work. It seems that no matter what I exported from Console One, I would always get an SSL error 42 when I tried to do an SSL BIND using the .DER file generated. So, I decided to try hitting the server’s management portal on port 8009 and export the root certificate via Internet Explorer. I did that and low and behold, it worked. You just need to make sure and export the right thing. I did the following:

  1. Hit https://myserver:8009 with IE
  2. In the dialog that appears, click “View Certificate”
  3. Select “Certification Path”
  4. Highlight “Organizational CA”
  5. Click “View Certificate”
  6. Click “Details”
  7. Click “Copy to File”

I used that for my credentials with the ActiveX control and it worked fine (that is the MYROOT.DER in verify.asp).

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.

Categories: Uncategorized

Disclaimer: This content is not supported by Micro Focus. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.