I cannot fetch appointments immediately via EWS on exchange server

Posted by DappleHou on Stack Overflow See other posts from Stack Overflow or by DappleHou
Published on 2013-10-29T09:45:40Z Indexed on 2013/10/29 9:53 UTC
Read the original article Hit count: 259

  1. I developed a transport agent for exchange server.
  2. In this agent, I code to invoke EWS to get appointments.
  3. I cannot get appointments immediately by the code.
  4. wait for a while, then go to get appointments again. This time, its OK.
  5. Why not immediately?

Here is my code. To solve it, I have to get appointments repeatedly till find appointments.

do{
    webServiceData.FindItemsResults<webServiceData.Appointment> results = folder.FindAppointments(view);
    Thread.sleep(100);
}while(results.Items.Count==0);

Note that the code is inside transport agent. Is there any other solutions?

© Stack Overflow or respective owner

Related posts about exchange-server

Related posts about ews