Access to the resource calendar through the C # EWS Managed API

I am using C # (.NET Framework 4) and Visual Studio 2010 Professional.

I have Exchange-Server 2007. There is a resource calendar on this server de.ffm.parking. There is a user with the same name, but he does not have an associated mailbox, so I can not use it.

ExchangeService _service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);

_service.Credentials = CredentialCache.DefaultNetworkCredentials;
_service.AutodiscoverUrl("user@suffix.com");

#region Test3   
FolderId te = new FolderId(WellKnownFolderName.Calendar, "de.ffm.parking");

DateTime start = DateTime.Now;
DateTime end = DateTime.Now.AddDays(30);

CalendarView view = new CalendarView(start, end);

foreach (Appointment exchangeAppointment in _service.FindAppointments(te, view))
{
    Console.WriteLine(exchangeAppointment.Subject + "Date: " + exchangeAppointment.Start.ToString());
}
#endregion

So this code gives me an error:

The SMTP address does not have a mailbox associated with it.

Do you know how to access the resource calendar? My user has rights (each user) to access this calendar.

My PublicFolder_Root is also empty.

+4
source share
1

, .

+2

All Articles