Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 19th, 2003, 07:09 PM
Registered User
 
Join Date: Aug 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Appointments with Exchange Server

Hi,

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")
Dim iAddr
iAddr = CreateObject("CDO.Addressee")
Dim iMBX

'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
   return false
Else
 ....continue


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:


Dim iPer
iPer = CreateObject("CDO.Person")
iPer.DataSource.Open("mailto:" & iAddr.EmailAddress)

Dim iMBX
iMBX = iPer.GetInterface("IMailbox")

Dim objAppt
Dim Conn
Dim iAtt

objAppt = CreateObject("CDO.Appointment")
Conn = CreateObject("ADODB.Connection")
Conn.Provider = "ExOLEDB.Datasource"

With objAppt
  .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 = "[email protected]"
  iAtt.Role = CDO.CdoAttendeeRoleValues.cdoRequiredParticipant
  'Save the appointment
  Conn.Open(iMBX.BaseFolder)
***** fails on line above (the base folder never gets set correctly)

  .DataSource.SaveToContainer(iMBX.Calendar, Conn)
End With


Just wondering if anyone has done this or has seen some links/info
pertaining to this scenario.

Any help, suggestions are appreciated. Thanks.

Jack
 
Old January 13th, 2004, 04:13 PM
Registered User
 
Join Date: Jan 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Jack,

Did you ever resolve this issue? I have been assigned the task of creating some reports from Exchange Server Calendar/Appointment folder fields so I need essentially the same information. It would seem that either CDOEX or WebDAV will have to be used but I know little regarding either and WebDAV looks kind of ugly.

Any information, resources or sample code would be appreciated.

Bill

 
Old February 27th, 2005, 07:03 PM
Registered User
 
Join Date: Feb 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Has anyone got an answet to this problem would be very help it is exactly what i am trying to do?

 
Old May 29th, 2006, 08:28 AM
Registered User
 
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have the same issue Do we have any solution?

 
Old January 27th, 2011, 04:59 AM
Registered User
 
Join Date: Jan 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There are a few libraries that wrap WebDAV calls up which may get you up and productive quicker.

Here is an example how to create an appointment: http://www.independentsoft.de/webdav...pointment.html





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to recieve mail from exchange server netsjp General .NET 2 February 4th, 2011 02:27 PM
how to connect to exchange 2003 server lionking Pro VB.NET 2002/2003 1 February 1st, 2011 11:00 AM
How to do exchange server programming naresh_0204 General .NET 1 October 31st, 2006 01:50 AM
SQL and Exchange server c_bananas SQL Server 2000 0 October 10th, 2003 05:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.