Appointments with Exchange Server
Here's my scenario (sorry so long):
Asp.Net Web Site on a Win2K server.
Client wants the web site to provide user with the ability to set/get appointments (calendar) (also accessing/creating Tasks could be required) from their Exchange server email account.
The Exchange (Exchange 2000) server is on a different box than the web site server (but same domain).
I have tried to research this pretty thoroughly (msdn, internet, google, etc...) but it seems all I come with is using CDOEX. I have code that works on my dev box (which is running Win2k/Ex2k on same box).
But the final production server (web site) isn't suppose to have Ex2k installed on it, and as stated above, it will not be running on the same box as what the client's Ex2k server is running on.
When I tried running the code on the client's dev box against their exchange server I keep getting an error (something like service isn't running or server doesn't exist).
Here's a chunk of the code:
' Dim Info
' Info = CreateObject("ADSystemInfo")
iAddr = CreateObject("CDO.Addressee")
'iAddr.EmailAddress = "UsersMailbox" & "@" & Info.DomainDNSName
iAddr.EmailAddress = "UsersMailbox" & "@" & "clientsExchangeDomaineDNSName"
' Search by binding to an LDAP server in current domain.
If Not iAddr.CheckName("LDAP://" & "clientsExchangeDomaineDNSName") Then
I commented out the info (and CreateObject("ADSystemInfo") and tried to hard code their exchange server dns name instead. But that doesn't work either. The code fails on the
iAddr.CheckName("LDAP://" & "clientsExchangeDomaineDNSName")
Even if I comment this part out and press on with the actual setting of the appointment using the following code:
iPer = CreateObject("CDO.Person")
iPer.DataSource.Open("mailto:" & iAddr.EmailAddress)
iMBX = iPer.GetInterface("IMailbox")
objAppt = CreateObject("CDO.Appointment")
Conn = CreateObject("ADODB.Connection")
Conn.Provider = "ExOLEDB.Datasource"
.StartTime = "8/14/2003 1:00:00 PM"
.EndTime = "8/14/2003 2:00:00 PM"
.Subject = "Meet me - in bored room"
.Location = "Our Office"
.TextBody = "Testing setting appointments."
iAtt = .Attendees.Add
'Set the persons to invite
iAtt.Address = "firstname.lastname@example.org"
iAtt.Role = CDO.CdoAttendeeRoleValues.cdoRequiredParticipant
'Save the appointment
***** fails on line above (the base folder never gets set correctly)
Just wondering if anyone has done this or has seen some links/info
pertaining to this scenario.
Any help, suggestions are appreciated. Thanks.