【发布时间】:2017-05-10 10:24:12
【问题描述】:
在我的 MVC 项目中,我使用 ews 在 Outlook 日历中创建和更新约会我有一个小问题。当我使用 ews 在 Outlook 日历中创建/更新约会时,正文消息显示不正确!
我正在添加
appt.Body = "rådgivning Møde"
在 Outlook 日历中,此消息将显示为:r?dgivning M?de
Appointment appt = Appointment.Bind(ExchangeServerConnection, apptID, new
PropertySet(AppointmentSchema.Subject, AppointmentSchema.Body, AppointmentSchema.TextBody, AppointmentSchema.LegacyFreeBusyStatus));
if (appt.LegacyFreeBusyStatus == appstatus)
{
appt.Subject = subject;
appt.Body = message;
appt.LegacyFreeBusyStatus = LegacyFreeBusyStatus.Busy;
//set explicit mode to SendToNone. Default mode is SendToAllAndSavecopy, it converts appointment to meeting.
SendInvitationsOrCancellationsMode mode = SendInvitationsOrCancellationsMode.SendToNone;
appt.Update(ConflictResolutionMode.AlwaysOverwrite, mode);
【问题讨论】:
-
我建议您在代码中启用跟踪msdn.microsoft.com/en-us/library/office/…,然后发布正在发送到服务器的 XML。它应该都是 UTF8,所以它不应该是一个问题,但这会告诉你什么是发布到服务器。
标签: c# asp.net-mvc exchangewebservices