Exchange APIを使用してExchangeサーバからカレンダー情報を取得しようとしていますが、次のエラーが発生します。「Exchange Serverは要求されたバージョンをサポートしていません。カレンダーを初期化する。私が接続しているサーバーは明らかに交換のハイブリッドバージョンを実行しています。次のようにExchangeサーバからカレンダー情報にアクセスできない
私のコードは次のとおりです。
ExchangeService service = new ExchangeService();
service.Credentials = new WebCredentials("user", "pass");
service.AutodiscoverUrl("url");
DateTime startDate = DateTime.UtcNow;
DateTime endDate = startDate.Date.AddHours(23).AddMinutes(59).AddSeconds(59);
const int NUM_APPTS = 50;
//error happens on this line
CalendarFolder calendar = CalendarFolder.Bind(service, WellKnownFolderName.Calendar, new PropertySet());
CalendarView cView = new CalendarView(startDate, endDate, NUM_APPTS);
cView.PropertySet = new PropertySet(AppointmentSchema.Start, AppointmentSchema.End, AppointmentSchema.Location);
}
すべてのヘルプははるかに高く評価されるだろう。ありがとう。