Get an error on delete appointment operation RRS feed

  • Question

  • As per my requirement, I have to search and delete out, individual appointments on the basis of appointment Start and Body text.

    Below mentioned code works fine if I execute code in debug mode line by line, but throws an exception if try to execute same code after deployment.

    Dim clnd As CalendarFolder
    clnd = CalendarFolder.Bind(objService, New FolderId(WellKnownFolderName.Calendar, strMailBox))
    For Each _item As Item In clnd.FindAppointments(New CalendarView(dtAppointmentDate, dtAppointmentNext))
    Dim _apt As Appointment
    _apt = Appointment.Bind(objService, _item.Id)
    If (_apt.Body.Text = strApptBody) Then
    If (_apt.Start = dtAppointmentDate) Then
    End If
    End If

    Please help me out.


    Monday, November 28, 2011 2:19 PM

All replies

  • Missed out exception mesage

    "Request failed. The underlying connection was closed: A connection that was expected to
     be kept alive was closed by the server."

    Monday, November 28, 2011 2:21 PM
  • Looks like your either getting throttled by the server or because your code is going to at the moment generate a separate request for each Item your trying to delete you might find that if your traversing a firewall that the firewall is dropping your connection. What you would be better to do is batch the deletes which should get around the problems your having see http://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.exchangeservice.deleteitems(v=EXCHG.80).aspx


    Tuesday, November 29, 2011 3:37 AM
  • I have updated issue with additional information at


    Wednesday, November 30, 2011 10:28 AM