4
我正在使用C#(.NET Framework 4)和Visual Studio 2010 Professional。通過EWS託管API訪問資源日曆C#
我有一個Exchange服務器2007.在這臺服務器上有一個名爲de.ffm.parking
的資源日曆。有一個用戶名稱相同,但沒有關聯的郵箱,所以我不能使用它。
ExchangeService _service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
_service.Credentials = CredentialCache.DefaultNetworkCredentials;
_service.AutodiscoverUrl("[email protected]");
#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
所以這個代碼給我一個錯誤:
The SMTP address has no mailbox associated with it.
你知道如何訪問資源日曆?我的用戶有權(每個用戶都有)訪問此日曆。
我的PublicFolder_Root也是空的。