【问题标题】:EWS throw an exception in Autodiscover methodEWS 在自动发现方法中引发异常
【发布时间】:2014-12-13 03:45:29
【问题描述】:

我正在尝试通过 EWS 连接邮箱。在那一行之后:

 service1.AutodiscoverUrl(emailAdress);

这段代码抛出错误

Message = "自动发现服务返回错误"

InnerException = " "

TargetSite = "布尔 TryLastChanceHostRedirection[TSettings] (System.String, System.Uri, TSettings ByRef)"

帮助链接 = ""

此代码适用于其他域上的另一个邮箱。

我认为 Exchange 服务器有问题。

【问题讨论】:

    标签: c# exchange-server exchangewebservices


    【解决方案1】:

    自动发现服务正在提供重定向。尝试将此callback 添加为自动发现 URL 方法中的第二个参数:

    static bool RedirectionCallback(string url)
    {
        // Return true if the URL is an HTTPS URL.
        return url.ToLower().StartsWith("https://");
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-12
      • 2017-06-03
      • 2010-12-07
      • 1970-01-01
      • 2012-01-06
      • 2020-11-07
      相关资源
      最近更新 更多