CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> Tips & Solutions

 ASP Autentication against Active Directory

Print topic Send  topic

Author Message
Max
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 SQL
Dim RecordSet
Dim Connection
Dim UserIDField
Dim GroupIDField
Dim OpenDS
Dim objDomain

Set Connection = New clsDBXXXXXX
Connection.Open
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
else
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 http://support.yessoftware.com.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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