Exchange Web Services - 创建资源约会,但与会者无法看到资源
问题描述:
我试图与Exchange一起玩,以便与其整合房间预订系统。Exchange Web Services - 创建资源约会,但与会者无法看到资源
我已经创建了一个房间邮箱并进行了设置,以便它自动接受预约请求。
以标准用户身份创建约会时,我可以将房间添加为资源并显示其可用性。如果我预订了它,那么它会成功预订。
我已经创建了一个通过Exchange Web Services与房间作为资源的约会。该资源已成功预订(在以会议室代表的身份打开时已确认),但未出现在与会者观看的会议中。
var service = new ExchangeService(ExchangeVersion.Exchange2007_SP1) {
Credentials =
new NetworkCredential("username", "password", "domain"),
Url = new Uri("https://myexchangeserver.co.uk/EWS/Exchange.asmx")
};
var appointment = new Appointment(service)
{
Subject = "Created by ExchangeTest app",
Body = "Some body text....",
Start = startTime,
End = endTime
};
appointment.RequiredAttendees.Add("[email protected]");
appointment.Resources.Add("[email protected]");
appointment.Save(SendInvitationsMode.SendOnlyToAll);
任何想法,为什么它不显示,因为它会如果我手动预订它?
作为一个备注,我实际上并没有能够以任何其他用户身份查看该房间的日历;它说该文件夹无法找到。
答
也许你可以尝试手动创建会议,然后绑定到它。这样做你应该能够浏览对象并检查与你的不同之处是什么?
var appointment = Appointment.Bind(service, new ItemId("yourmeetingid"));
答
我不完全确定你的主要问题。
关于旁注:
您是否尝试过搜索约会?
FolderId folder = new FolderId(WellknownFolderName.Calendar,"[email protected]");
CalendarView calendarView = new CalendarView(startDate, endDate);
foreach (Appointment exchangeAppointment in service.FindAppointments(folder, calendarView))
{
// Here you should be able to get access on the appointments at the specified folder & address
}