p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_components thread: adsi


Message #1 by "Andry Fixa" <fixafixa@m...> on Sat, 3 Mar 2001 08:37:40 +0700
hi all,...



I have asp script that create user and their mailbox, but error in ldap,

could you give me a solution ?

I have installed in my comp windows 2000 server, exchange 5.5 sp 3, active

directory connector.



Description In windows 2000

Full Computer Name=fixafixa.freemail.com

Domain=freemail.com



Description In exchange,

Server="fixafixa"

Site="indonesia"

Organization="freemail"



to create user is succed, but error in Get Object in LDAP.

i think there is no connection with exchange in script.

but to create user and mailbox in exchange administrator, succed .



this is my asp script



<%

sUserName = "name1"

sLastName = "last"

sFirstName = "first"



FullName = "full"

Descript = "This is a Test User"

sPassword = "password"



set dom = GetObject("WinNT://FIXAFIXA")

set usr = dom.Create("user", sUserName)

usr.SetInfo

usr.setPassword spassword

usr.setInfo



dim server, Org, Site

server = "FIXAFIXA"

Org = "FREEMAIL"

Site = "INDONESIA"



ADsPath = "LDAP://" + server

ADsPath = ADsPath + "/cn=Recipients,OU="

ADsPath = ADsPath + Site

ADsPath = ADsPath + ",O="

ADsPath = ADsPath + Org

Set objCont = GetObject(ADsPath)



'Create a new MailBox

Set mailBox = objCont.Create("organizationalPerson", "cn=" & strAlias)

mailBox.Put "mailPreferenceOption", 0

mailBox.Put "givenName", sFirstName

mailBox.Put "sn", sLastName

mailBox.Put "cn", sFirstName

mailBox.Put "uid", sUserName

mailBox.SetInfo

%>





error in Set objCont = GetObject(ADsPath)

but user account is created



do you have any suggestion ?

or maybe there is software that i must install ?

or maybe you can give me another script .



thx,














  Return to Index