aspose file tools
The moose likes EJB and other Java EE Technologies and the fly likes LDAP error at MS_Exchange Server Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "LDAP error at MS_Exchange Server " Watch "LDAP error at MS_Exchange Server " New topic
Author

LDAP error at MS_Exchange Server

Kalyan Chakravarthy
Greenhorn

Joined: Jan 10, 2002
Posts: 1
when a user registers on our website, we have to create a mailbox
through
an ASP page on MS Exchange Server5.5 on a Windows NT4.0 with IIS4.0 and
ADSI2.5 installed on it.
Since i am new to this please bear with my simple queries and help me
out.
here is my questionaire...
1. Do i need to install anything else on my server for this job?
2. Do i need to change any settings on my Exchange server or IIS?
3. How do i check the version of LDAP running on the system?
4. I have not installed any LDAP server on my system as it seems MS
Exchange
5.5 has a built-in one. Is this true?
Now let me tell you the trials i have made.
1. Due to reported conflicts in Port number 386 used by LDAP by default
i have changed it to 777
following is the code which i am using to create a mail box. in this
code 2. I am trying to first logon to the NT Server, for creating a
mailbox, with administrator rights.
i guess the logon itself fails. So i need some help in this area also.
3. Now i am trying to create a mailbox and then trying to associate it
with an existing NT account.

<%
OrgName = "nuis"
SiteName = "kyzencs"
strUserName = "administrator" ' this user has admin rights on winnt
server
strPassword =""
LoginId = "kalyan" 'mailbox name to create
FirstName = "Kalyan"
LastName = "Chakravarthy"
'Start Logon to NT
strADsPath = "WinNT://venus"
Set oADsObject = GetObject(strADsPath)
Dim strADsNamespace
Dim oADsNamespace
strADsNamespace = left(strADsPath, instr(strADsPath,
":"))
set oADsNamespace = GetObject(strADsNamespace)
Set oADsObject = oADsNamespace.OpenDSObject(strADsPath,
strUserName, strPassword, 0)
'End Logon to NT
'Start Getting the SID for the user ID to which all mailboxes are
associated
with by using ADSItools component
dim varSecurityID
Set objSIDComp = Server.CreateObject("ADSITools.ExNTSID")
varSecurityID = objSIDComp.GetMySID("venus", "kyzencs",
"Administrator")
'End Getting the SID for the user ID that all mailboxes are associated
with

'Start Creating the mailbox in the DS with ADSI
strPath = "LDAP://venus:777/o=" & OrgName & "/ou=" & SiteName
&"/cn=Recipients"
Set recipcont_obj = GetObject(CStr(strPath))
'LDAP Name...should be same as alias
Set recip_obj = recipcont_obj.Create("organizationalPerson",
Loginid)
recip_obj.Put "mailPreferenceOption", 0
recip_obj.Put "sn", LastName 'Last Name
recip_obj.Put "cn", LoginId 'Mailbox Name
recip_obj.Put "givenName", FirstName 'First Name
recip_obj.Put "uid", LoginId 'Alias
recip_obj.Put "Home-MTA", "cn=Microsoft MTA,cn=" & ServerName &
",cn=Servers,cn=Configuration,ou="
& SiteName & ",o=" & OrgName
recip_obj.Put "Home-MDB", "cn=Microsoft Private MDB,cn=" &
ServerName
& ",cn=Servers,cn=Configuration,ou=" & SiteName & ",o=" & OrgName
Response.Write varSecurityID
recip_obj.Put "Assoc-NT-Account", (varSecurityID) 'Associate this
mail box with a primary Windows Account of Administrator
recip_obj.Put "mail", LoginId & "@" & Domain 'SMTP Address
recip_obj.setinfo ' commit the contents of the adsi object to the
directory

'End Creating the mailbox in the DS with ADSI
Response.Write "Success... Your new MailBox created."
%>
using this code i am getting the following error:error '80072021'
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3879
OK. Let me understand. This is a web site about Java. This is a forum about J2EE (JAVA 2 Enterprise Edition). Why are you asking a question about ASP here? This bears no relation to Java or J2EE whatsoever...
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: LDAP error at MS_Exchange Server
 
Similar Threads
ASP Question.
Equivalent of GetObject("WinNT:") in JSP
Calling JNDI from JSP
QuickPlace and ADSI
WLS6.1 - Configuring realm for openLdap