这是我获取EWS中一些日历项(约会)的代码。但这总是抛出异常。
异常信息:该属性不能与此类型的限制一起使用。
异常信息:该属性不能与此类型的限制一起使用。
private void GetChangedAppointmentInformation(Appointment appointment)
{
try
{
// Save appointment details into local variables
id = appointment.Id.ToString();
body = appointment.Body;
duration = appointment.Duration;
end = appointment.End;
bookingKey = appointment.Subject;
subject = appointment.Subject;
location = appointment.Location;
ItemView view = new ItemView(1000);
// Create a search filter that filters email based on the existence of the extended property.
SearchFilter eq = new SearchFilter.IsEqualTo(AppointmentSchema.ICalUid, appointment.ICalUid);
// Search the Calendar with the defined view and search filter. This results in a FindItem operation call to EWS.
FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.Calendar, eq, view);
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
}
您能否就此向我提供建议?我已经查阅了MSDN和其他几个在线资源,但仍在尝试弄清楚其中的问题。