質問

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

I have an Exchange-Server 2007. On this server there is a resource calendar called de.ffm.parking. There is a user with the same name but it has no associated Mailbox so I can´t 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 has no mailbox associated with it.

Do you know how to access a resource calendar? My user has rights (every user does) to access this calendar.

My PublicFolder_Root is empty as well.

役に立ちましたか?

解決

I solved the problem by inserting the Mail address instead of the Calendar Name.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top