【发布时间】:2018-06-30 15:30:06
【问题描述】:
我的公司刚刚将一些邮箱移动到 O365。不幸的是,这会破坏使用 EWS 创建的应用程序。在尝试调用 AutodiscoverUrl() 时,我遇到了一个错误。
'找不到自动发现服务。'
代码:
service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
service.UseDefaultCredentials = true;
service.AutodiscoverUrl(mailbox, RedirectionCallback);
private bool RedirectionCallback(string url)
{
return true;
}
我也尝试将 URL 设置为以下
service.Url = new Uri("https://autodiscover.MYDOMAIN.com/autodiscover/autodiscover.xml");
service.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx");
这些都没有解决问题。有谁知道从这里去哪里?
【问题讨论】:
标签: c# exchangewebservices autodiscovery