我正在尝试使用Exchange来整合房间预订系统。
我已经创建了一个房间邮箱并进行了设置,以便自动接受预约请求。
当创建约会作为标准用户时,我可以将房间添加为资源,并显示其可用性。如果我预订,那么它会成功预订。
我通过Exchange Web服务创建了一个约会空间作为资源。资源已成功预订(在将其作为会议室代表打开时已确认)但未在任何与会者查看的会议中显示。
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("AnAttendee@myexchangeserver.co.uk");
appointment.Resources.Add("ARoom@myexchangeserver.co.uk");
appointment.Save(SendInvitationsMode.SendOnlyToAll);
如果我手动预订它会不会显示为什么会有任何想法?
作为旁注,我实际上无法以除代表之外的任何用户的身份查看此会议室的日历;它说无法找到该文件夹。
答案 0 :(得分:1)
我不完全确定你的主要问题。
关于旁注:
您是否尝试过搜索约会?
FolderId folder = new FolderId(WellknownFolderName.Calendar,"test@test.com");
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
}
答案 1 :(得分:0)
也许您可以尝试手动创建会议,然后绑定到它。这样你应该能够浏览对象并检查与你的差异是什么?
var appointment = Appointment.Bind(service, new ItemId("yourmeetingid"));