Update an existing appointment using WebDav RRS feed

  • Question

  • Hi,

    How do I update an existing appointment in the Exchange Server using WebDAV.

    I am able to successfully create a new appointment using WEBDAV and can also retrieve the same using the GUID of that appointment in the select query. However, I am not able to update the same using WEBDAV.


    Does the update of an existing appointment and creating a new one has the same methodology ??


    Please help me with some examples / references .


    Thanking You in advance

    Kind Regards


    Friday, September 21, 2007 6:06 AM

All replies

  • You can a use Proppatch (which you probably used to create the appointment) to update it. Basically you just need to proppatch the particular properties you wish to update have a look at for more details.





    Monday, September 24, 2007 1:17 AM
  • Hi Glen,

    Thank you very much for your reply. It really helped me.

    I am now looking on to deleting an appointment from the Exchange server.


    The scenario is something like this:

    1. I created an appointment.
    2. Then I updated the same.
    3. I deleted the same.
    4. Create a fresh new appointment

    At this juncture (at point # 4), I got an error "The remote server returned an error (404)". After some research, it was found that the appointment creator was not logged off. I explicitly logged into the Appointment Creator's mailbox viaOWA and logged it out.  I then tried to perform Step # 4 and it worked.


    Is that the behavior of WEBDAV while deleting an appointment??


    Is that I am missing something??


    Please help

    Thanking You in advance


    Kind Regards


    Monday, September 24, 2007 9:40 AM
  • No this doesn't sound right it doesn't matter if the user is logged onto to owa or outlook. It sounds like your logic isn't quite right somewhere a 404 error means the resource is not found. Without looking at your code its hard to say which resource it can't find are you using a unique URI when you create your appointments. How are you deleting the appointment ? maybe you removing the whole folder instead of just the appointment and logging into OWA is just recreating the folder you deleted.? sounds weird though i would check your logic and you can check the mailbox in question using tools like Exchange Explorer from the Exchange SDK tools






    Monday, September 24, 2007 10:08 AM

    Hi Glen,

    The URI that I am creating is unique. Its something like "<AppointmentSubject> + DateTime.Now.eml". So I suppose that would be always unique.

    Secondly, its not that the user is logged into OWA or Outlook. I am facing this issue when I am deleting a particular appointment and then IMMEDIATELY creating a new one.


    Following are the steps that I am using to delete a particular appointment:

    1. Query the Exchange Server using this unique appointment id in the appointmentcreators id (which is http://<domainname>/exchange/<appointmentCreatoresuserid>/Calendar.
    2. Get the HTTPWebRequest using Create() method
    3. Set the credentials
    4. Set the methods (KeepAlive, Timeout and Set) of httpwebrequest
    5. Set the Method property to "Delete"
    6. Get the Response.

    Is that the right way of deleting an appointment. If not, please provide me with some stuff which illustrates the same. I also need to send an update notification to the recipient of the meeting request stating that the meeting is cancelled.




    The appointment gets deleted from the appointment Creators folder. But when the I again try to create a new appointment, I am facing this 404 error. Also at times I get 409 error (Conflict error).


    I hope I am able to explain you the issue.


    Kind Regards


    Monday, September 24, 2007 2:29 PM
  • >Secondly, its not that the user is logged into OWA or Outlook. I am facing this issue when I am deleting a particular >appointment and then IMMEDIATELY creating a new one.


    It shouldn't matter they should be separate requests that are unrelated there are no limits on the number of simultaneous requests you can make. What if you delete the appointment via another method and then try and create it eg delete it using Exchange Explorer (which uses WebDAV) and then create it with your code does this work ? . Have you just tried pausing the debugger for a minute and then trying the create does it make a differance.


    What those status's (404 and 409) are telling you is that there is a problem with the resource you are trying to use. Generally the cause of this would be the code your using is causing the resource to have this issue (that would be my guess), or there are maybe external factors involved eg maybe outlook 2003/2007 clients connecting in Cache mode and trying to sync etc you need to try and test these type of things eg are you testing this in a development environment where you wouldn't be affect by this type of issue etc.


    The other thing you can try is doing some network captures of whats been sent and recieved by your code you may be able to determine more by looking at the full request and responses that are coming from the server





    Monday, September 24, 2007 11:58 PM
  • Hi Glen,

    It seems that the issue is being a bit of jumbled - up. I just wanted to delete an exisiting meeting request (or appointment) and send a cancellation request to all the attendees of the same. Can that be possible using WEBDAV?

    I would be really thankful to you if your can help me with any sample code (even Exchange Explorer).


    Kind Regards,


    Wednesday, September 26, 2007 7:40 AM
  • Hi p4pratik,

    I am trying to retrieve  all the details of a calendar like the start and end time of meeting,organizer and the attendees of the meeting mainly.My code can only retrieve the start and end time and also the subject of the meeting.

    But i need to retrieve the names of the attendees and organizer mainly.

    Can u please share the code you used to retrieve the appointment.

    It will be very useful.

    Tuesday, October 16, 2007 12:41 PM

    Hello there, here is a snippet of the xml file you need to send to create the cancellation request:


       "<gTongue Tiedet><gStick out tonguerop>\n"
    + "<g:contentclass>urn:content-classes:calendarmessage</g:contentclass>\n"
    + "<eSurpriseutlookmessageclass>IPM.Schedule.Meeting.Canceled</eSurpriseutlookmessageclass>\n"
    + "<cal:alldayevent>0</cal:alldayevent>\n"
    + "<cal:busystatus>BUSY</cal:busystatus>\n"
    + "<calBig Smiletstart>" + startDate + "</calBig Smiletstart>\n"
    + "<calBig Smiletend>" + endDate + "</calBig Smiletend>\n"
    + "<mailTongue Tiedubject>" + nameRem + "</mailTongue Tiedubject>\n"
    + "<cal:location>location</cal:location>\n"
    + "<mail:textdescription>descrition Details</mail:textdescription>\n"
    + "<cal:meetingstatus>CANCELLED</cal:meetingstatus>\n"
    + "<mailheader:to>" + user1_email + ... + "</mailheader:to>\n"
    + "<cal:responserequested>0</cal:responserequested>\n";

    + "<cal:uid>" + meeting_uid + "</cal:uid>\n"
    + "<cal:method>CANCEL</cal:method>\n"
    + "</gStick out tonguerop></gTongue Tiedet>";


    Hope it helps,


    Tuesday, November 6, 2007 7:46 PM