Search KB Filter article types
MS Active Directory (LDAP) Authentication
By: lmp014
This is a class to authenticate a user against Microsoft Active directory using the LDAP protocol.
Categories: Authentication, IIS
Tags: Architects, Developers, Visual WebGui Pipeline, VB.NET, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
Revision: 1
Posted: 06/Jan/2010
Updated: 06/Jan/2010
Status: Publish
Types: Code

The class has four methods :

New : Is creating the instance and accepts the LDAP path as parameter.

IsAuthenticated : Will try to authenticate using the supplied parameters (domain, user, password)

GetGroups : Once IsAuthenticated has been called and the user is authenticated, will return the groups the user is memberOf

GetRootDSE : Will return the root LDAP to which the windows is defined.

Usage :

 

Dim oLDAP As clsLdapAuthentication = New clsLdapAuthentication(My.Settings.LDAPPath)
 
   Select Case oLDAP.IsAuthenticated("DOMAIN", LogonFrmInstance.User, LogonFrmInstance.Password)
                    Case True
                        Context.Session.IsLoggedOn = True
                        ............
 
                    Case False 'Error Occured
                        Context.Session.IsLoggedOn = False
                        ............
                End Select

Note: Codes are submitted as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Terms of Agreement:
By using this code, you agree to the following terms...

1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
3. You may link to this code from another website, but ONLY if it is not wrapped in a frame.
4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


About the author

Related Articles

Authentication  
Title Update Author
Tags: Developers, Navigation, 1. Beginner, 2. Intermediate, 3. Advanced, Integration, Navigation, ASP.NET, v6.3, v6.4 and Later
12/Jan/2007    2007/01/12
Tags: Developers, Navigation, 2. Intermediate, 3. Advanced, ASP.NET, Pre v6.3, v6.3, v6.4 and Later
05/Jan/2009    2009/01/05
This video demonstrates how to create a logon form using the form authentication support in Visual WebGui
Tags: Architects, Developers, Windows & Dialogs, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
01/Jan/2009    2009/01/01
This video demonstrates How to create a register form using Visual WebGui
Tags: Architects, Developers, Windows & Dialogs, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
01/Jan/2009    2009/01/01
This video demonstrates How to create a register form using Visual WebGui.
Tags: Architects, Developers, Windows & Dialogs, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
02/Jan/2008    2008/01/02
Tags: Developers, Events, Navigation, 1. Beginner, 2. Intermediate, Navigation, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
03/Jan/2009    2009/01/03
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS