I cannot fetch appointments immediately via EWS on exchange server
- by DappleHou
I developed a transport agent for exchange server.
In this agent, I code to invoke EWS to get appointments.
I cannot get appointments immediately by the code.
wait for a while, then go to get appointments again. This time, its OK.
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?