first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

ASP, VBScript and ADSI: ADSI Authentication Function; basADSILogin

Function basADSILogin(vDomain,vUser,vPwd) Dim vADsPath vADsPath = "WinNT://" & vDomain & "/" & vUser & ",user"

Dim objADSI

basADSILogin = False

On Error Resume Next
Set objADSI = GetObject(vADsPath)
If Err.number <> 0 Then Exit Function

Dim objADSINamespace : Set objADSINamespace = GetObject("WinNT:")

On Error Resume Next
Set objADSI = objADSINamespace.OpenDSObject(vADsPath,vUser,vPwd,0)
If Err.number = 0 Then
    basADSILogin = True
End If

Set objADSI = Nothing
Set objADSINamespace = Nothing

End Function

mod date: 2003-02-06T19:19:32.000Z