« Previous Next »

Answered Thread: IIS Classic ASP Vbscript authentication login on LDAP - OPENLDAP - iPlanet

Last post 10-05-2009 10:44 AM by Gazcon. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 10-01-2009, 10:38 AM

    • Gazcon
    • Not Ranked
    • Joined on 07-30-2009, 1:08 PM
    • Posts 4

    IIS Classic ASP Vbscript authentication login on LDAP - OPENLDAP - iPlanet

    I've been spend hours and hour searching for code like this, finally I was make this works (yeah!), I hope this wolud be useful for somebody... = )
     
    struser= "your_user"
    strpwd= "your_user_pwd"
    strdomain= "your_domain.com"
    strvaliddn= "uid=" & struser & ",ou=People,o=" & strdomain & ",o=isp"
    strservername="your_server_name_or_ip:389"


    Set conn = CreateObject("ADODB.Connection")
    conn.Provider = "ADsDSOObject"
    conn.Properties("User ID") = struser
    conn.Properties("Password") = strpwd
    conn.Open "ADs Provider", strvaliddn, strpwd

    Set objldap = CreateObject("ADODB.Command")
    objldap.ActiveConnection = conn
    on error resume next
    objldap.CommandText = "SELECT cn FROM 'LDAP://" & strservername & "/" & strvaliddn & "' "
    set rs = objldap.Execute

    If rs.eof or rs.bof then
       authresult=""
    else
       authresult="Y"
    end if

    set objldap=nothing
    set rs=nothing
    Set conn=nothing
  • 10-04-2009, 9:18 PM In reply to

    Re: IIS Classic ASP Vbscript authentication login on LDAP - OPENLDAP - iPlanet

    Is this with windows server 2003?

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield


    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 10-05-2009, 10:44 AM In reply to

    • Gazcon
    • Not Ranked
    • Joined on 07-30-2009, 1:08 PM
    • Posts 4

    Answered Re: IIS Classic ASP Vbscript authentication login on LDAP - OPENLDAP - iPlanet

    Yes Steve, windows 2003 server R2 estandar edition.
Page 1 of 1 (3 items)
Microsoft Communities