所以当我点击我的应用程序中的提交按钮以在outlook上创建约会时 调用函数SendOutLookAppointment() 我得到这行约会的错误.Save(); 请求失败。无法解析远程名称:'servername'
public static void SendOutLookAppointment()
{
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010);
service.UseDefaultCredentials = false;
service.Credentials = new NetworkCredential("admin@test.com.", "password");
service.AutodiscoverUrl("admin@test.com");
ImpersonatedUserId i = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, "admin@test.com");
service.ImpersonatedUserId = i;
Appointment appointment = new Appointment(service);
appointment.Subject = "Calendar booking via WebService";
appointment.Body = "this is a test";
appointment.Start = new DateTime(2014, 02, 03, 21, 0, 0);
appointment.End = new DateTime(2014, 02, 02, 22, 0, 0);
appointment.RequiredAttendees.Add("me@test.com");
appointment.Save();
}
答案 0 :(得分:0)
我有类似的问题。在我的情况下,问题是不同的许可证。许可证:“Exchange Online Kiosk”指定:“不允许通过Exchange Web服务直接访问Kiosk用户邮箱。” 您可以在此处检查各种许可证类型之间的差异:http://www.office365advisors.com/exchange-licensing/