Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Advanced
Jan 3, 2001

Correct Authentication Flags in ADSI and VB


If you are unsuccessful at attempting to bind to an object residing in a Netscape Directory Server and you are using ADSI in VB or VBscript, you are likely using the incorrect Authentication flag used to define the binding options.

The method call used to bind to a directory server object using ADSI is OpenDSObject and it requires four parameters. One of the parameters is the authentication flag. The documented authentication flags are as follows:
 
        ADS_SECURE_AUTHENTICATION       = 0x1
        ADS_USE_ENCRYPTION              = 0x2
        ADS_USE_SSL                     = 0x2
        ADS_READONLY_SERVER             = 0x4
        ADS_PROMPT_CREDENTIALS  = 0x8
        ADS_NO_AUTHENTICATION           = 0x10
        ADS_FAST_BIND                   = 0x20
        ADS_USE_SIGNING                 = 0x40
        ADS_USE_SEALING         = 0x80
        ADS_USE_DELEGATION              = 0x100
        ADS_SERVER_BIND         = 0x200

None of these will work in this context with the Netscape Directory Server. The value, 0, must be used to bind success fully as in this example:
 
        Set ADs = GetObject("LDAP:")
        Set ADsObject = ADs.OpenDSObject(strADsPath, strADMIN_DN, strADMIN_PW, 0)
Try this and you will succeed.
John Lathrop
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date