How to get room appointment data efficiently from Exchange

1142275 pts.
Tags:
MAPI
Microsoft Exchange
I'm trying to get appointment data from different meeting rooms using Exchange Managed API. For the past month, I've been using "ExchangeService.GetUserAvailability()" and it's been working great. Here's the code:
private IEnumerable GetEvents(ExchangeService ExchangeService, string room, DateTime time, DateTime end)
{
    List attendees = new List();
    end = new DateTime(time.Ticks + Math.Max(end.Ticks - time.Ticks, time.AddDays(1).Ticks - time.Ticks));

    AttendeeInfo roomAttendee = new AttendeeInfo();
    roomAttendee.AttendeeType = MeetingAttendeeType.Room;
    roomAttendee.SmtpAddress = GetEmailAddress(room);
    attendees.Add(roomAttendee);

    Collection events = ExchangeService.GetUserAvailability(
                attendees,
                new TimeWindow(time, end),
                AvailabilityData.FreeBusy
            ).AttendeesAvailability[0].CalendarEvents;

    return (from e in events
            where e.EndTime > time
            select e);
}
But now I've had to run other tasks and it takes much longer and shows different error messages as well. What's the best way I should do this now? Regards.
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: