CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

YesSoftware Forums -> CodeCharge Studio -> Tips & Solutions

 ASP Autentication against Active Directory

Print topic Send  topic

Author Message
Posted: 01/14/2005, 10:16 AM

Hi all,

I would like to share with you the way I've been able to authenticate std CG login page against the AD database.

Following the CCLoginUser routine

'CCLoginUser @0-18342312
Function CCLoginUser(Login, Password)
Dim Result2, Result3, Result
Dim RecordSet
Dim Connection
Dim UserIDField
Dim GroupIDField
Dim OpenDS
Dim objDomain

Set Connection = New clsDBXXXXXX
SQL = "SELECT [ID_Res], [Grp_Abilit] FROM [HR_Table] WHERE [Username]='" & Replace(Login, "'", "''") & "'"
Set RecordSet = Connection.Execute(SQL)
Result2 = NOT RecordSet.EOF

Set OpenDS = GetObject("GC:")
on error resume next
Set objDomain = OpenDS.OpenDSObject("GC://RootDSE", Login, Password, &h4)
If Err.Number <> 0 Then
Result3 = False
Result3 = True
end if
on error goto 0

Result = Result2 and Result3
If Result Then

CCLoginUser = Result
End Function
'End CCLoginUser

Add new topic Subscribe to topic   

These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by  and YesSoftware, Inc.