Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 26th, 2004, 12:20 PM
Registered User
Join Date: Jul 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default LDAP Authentication -- Need Help

I need to build a small function that is passed user name and password from an asp.net form, authenticate against iPlanet 5.1 directory server using VB.Net.

I am currently trying to fetch the DN of the required entry by doing a filter on data obtained.
ie. DirectoryEntry("LDAP://SERVERNAME:PORTNO/ROOT_DN(OR SUFFIX)", USERName, Password)
SearchResults.Filter("(uid=" & PassedInUserName & ")")
If not SearchResults is nothing I get the path (which is teh DN of the user record).
Obviously this is not the exact code...but should give you the idea.

Post this I take the path and try getting a directory entry with the path and the given user name and password. If there is no exception that means the bind is successful else some info is wrong (either user name or password or some other login criteria such as expiry etc is not in the right state).

Is this the right approach ? Assuming it is; I am still having trouble getting this to work.

DirectoryEntry takes an AuthenticationType enum. If I set it to Anonymous the call goes through without any user info or even if its is incorrect user info as no authentication is being attempted. If I set the Authentication type to ServerBind or None I get an exception that says the Object is not available on the server.

What should the Authenticaton type be set as in case of connecting to iPlanet 5.1 ? Is there something else Im missing ? Is there a better approach ?

I'm new to LDAP and directory services....any help/guidance/suggestions/ideas will help.
Thanks and regards
Old May 25th, 2006, 12:13 AM
lch lch is offline
Authorized User
Join Date: Jan 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts

i also meet with this problem , can u share your solution with me ?

i wan to know :
1. is it the possible using C#.Net or ASP.net work on the sun product
-Iplanet server directory ?i wan to do the authentication/authorization

2. how to implement it , can u give me the related hyperlink or some
code samples ?

what i wan is :

login.aspx --> login.aspx.cs --> iplanet directory -->login.aspx.cs

i need to develop a security module , which can work on window(c#.net)
platform and unix (java) platform
iplanet will be the server directory !!!

if java.jndi have the method to connect to the MS AD, then i will
suggest my
project manager to use the AD to be the server directory

ASP/JSP --> AD ?
ASP/JSP --> Iplanet ?

which one will be more stable and more powerful ?

actually ....i advise my project manager to use the AD as the server direcotry for the authentication and authorization, bcos ....AD will compatible with the C# project

but ...after complete the C# version , then it will convert to Java version
and java version will run on the unix server ...

so ....my project manager decline to use the AD bcos ..he will afraid to occur imcompatible error in the future

do u have other solution for it

the server directory used for the authentication , just store username, userid, indexid

i have asked this question at

but i cant get the answer ....

my contact email is : lauchunhui@yahoo.com

pls contact me ASAP, thx

lau chun hui

Similar Threads
Thread Thread Starter Forum Replies Last Post
LDAP Authentication Problem zicaden Classic ASP Basics 6 January 14th, 2007 06:23 PM
Help Using LDAP user authentication in ASP page dreamzentrue Classic ASP Basics 0 November 11th, 2005 01:33 PM
LDAP bmains ASP.NET 1.0 and 1.1 Professional 0 May 26th, 2004 07:47 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.