Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / June 2005

Tip: Looking for answers? Try searching our database.

LDAP authentify connection with Infopath

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patrick - 07 Jun 2005 17:19 GMT
I'm using a VBScript which binds Active Directory with LDAP Protocol and with
. It works on each client computer.
I'm using the OpenDSObject method which binds to an ADSI object.But when i
put my script on Infopath, it returns me a error on the above line :

set dso = GetObject("LDAP:")

This is an exemple of my script :
'******************************************************
'Constants
const ADS_SECURE_AUTHENTICATION = &h1
const ADS_SERVER_BIND = &h200
'Global variables
Dim pDomain
Dim pUser
Dim pPwd
Dim strName
Dim pServer
Dim sLDAPPath

sLDAPPath = <ConnectionPath>
pUser     = <A user who has administrators rights on Active Directory>
pPwd     = <his password>
strName    = <Search string>

'connexion --> ERROR !!!
set dso = GetObject("LDAP:")

if (pServer<>"") then
  sFullPath = "LDAP://" & pServer & "/" & sLDAPPath
else
  sFullPath = "LDAP://" & sLDAPPath
end if
set oContainer = dso.OpenDSObject(sFullPath, pUser , pPwd, _
        ADS_SECURE_AUTHENTICATION + ADS_SERVER_BIND)

oContainer.Filter = Array("user")

For each usr in oContainer
 if instr(usr.name, strname) <> 0 then
     XDocument.DOM.selectSingleNode("/my:mesChamps/my:txt_mail").text=
usr.mail
 end if
Next
'*********************************************************

I don't understand why in Infopath, my code hangs a error !!! Do you have an
idea???
Thx a lot
Henning Krause [MVP] - 07 Jun 2005 21:07 GMT
Hello,

could you please post what type of error you get? Probaby an error number?

Greetings,
Henning Krause [MVP - Exchange]
==========================
Visit my website: http://www.infinitec.de
Try my free Exchange Explorer: Mistaya
(http://www.infinitec.de/software/mistaya.aspx)

> I'm using a VBScript which binds Active Directory with LDAP Protocol and
> with
[quoted text clipped - 47 lines]
> idea???
> Thx a lot
pierrick-allusse - 07 Jun 2005 22:04 GMT
In fact, the error is an 424 error (an object is required !). But the
error's line is this :
set oContainer = dso.OpenDSObject(sFullPath, pUser , pPwd, _
ADS_SECURE_AUTHENTICATION + ADS_SERVER_BIND)

and not  : set dso = GetObject("LDAP:")
But i think the object dso is a null object but i don't understand why?

> Hello,
>
[quoted text clipped - 59 lines]
>> idea???
>> Thx a lot
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.