最佳解答者
我想通過EWS來讀寫web outlook app 的行事歷數據。

問題
-
想通過EWS來讀寫web outlook app 的行事歷數據。 程式如下。
System.Net.ServicePointManager.ServerCertificateValidationCallback =
delegate(Object obj, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
{
// Replace this line with code to validate server certificate.
//Console.WriteLine("error ::: Replace this line with code to validate server certificate.");
return true;
};
// Create the bindings and set the credentials.
ExchangeServiceBinding esb = new ExchangeServiceBinding();
esb.Url = "https://Ex10.bill.local/EWS/exchange.asmx";
esb.Credentials = new NetworkCredential("Administrator", "Ewqazxc2008", "EX10.bill.local");CalendarItemType appointment = new CalendarItemType();
appointment.Body = new BodyType();
appointment.Body.BodyType1 = BodyTypeType.Text;
appointment.Body.Value = "test";
appointment.Importance = ImportanceChoicesType.High;
appointment.ImportanceSpecified = true;
appointment.ItemClass = "IPM.Appointment";
appointment.Subject = "Danny Subject";
appointment.Start = DateTime.Now.AddHours(2);
appointment.StartSpecified = true;
appointment.End = DateTime.Now.AddHours(3);
appointment.EndSpecified = true;CreateItemType request = new CreateItemType();
request.SendMeetingInvitations = CalendarItemCreateOrDeleteOperationType.SendToAllAndSaveCopy;
request.SendMeetingInvitationsSpecified = true;
request.SavedItemFolderId = new TargetFolderIdType
{
Item = new DistinguishedFolderIdType
{
Id = DistinguishedFolderIdNameType.calendar
}
};
request.Items = new NonEmptyArrayOfAllItemsType { Items = new ItemType[] { appointment } };CreateItemResponseType response = esb.CreateItem(request);
在這里出現
這樣的錯誤信息。
請問高手這是什么原因? 謝謝!
解答
-
您好!
这是一个有关EWS的问题,请您到EWS development论坛问问,这里只有英文论坛,但是为了更好地解决您的问题,我建议您将您的问题post至该论坛。
http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/
谢谢!
- 已標示為解答 cara chenModerator 2012年7月3日 上午 02:55
所有回覆
-
您好!
这是一个有关EWS的问题,请您到EWS development论坛问问,这里只有英文论坛,但是为了更好地解决您的问题,我建议您将您的问题post至该论坛。
http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/
谢谢!
- 已標示為解答 cara chenModerator 2012年7月3日 上午 02:55