【问题标题】:Exchange Webservice AutoDiscover service couldnt be located找不到 Exchange Webservices AutoDiscover 服务
【发布时间】:2017-03-31 02:40:46
【问题描述】:

我有这个代码

ExchangeService serviceInstance;
            serviceInstance = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
            serviceInstance.Credentials = new WebCredentials("Jacob.Alley", "*****", "emaildomain");
            serviceInstance.TraceEnabled = true;
            serviceInstance.AutodiscoverUrl("Jacob.Alley@emaildomain.com");

我收到“找不到自动发现服务”错误。 这是痕迹

`

Trying to call Autodiscover for Jacob.Alley@emaildomain.com on https://emaildomain.com/autodiscover/autodiscover.xml.
</Trace>
<Trace Tag="AutodiscoverRequestHttpHeaders" Tid="8" Time="2016-11-16 18:41:58Z"

POST /autodiscover/autodiscover.xml HTTP/1.1
Content-Type: text/xml; charset=utf-8
Accept: text/xml
User-Agent: ExchangeServicesClient/15.00.0847.030


</Trace>
<Trace Tag="AutodiscoverRequest" Tid="8" Time="2016-11-16 18:41:58Z" Version="1
.00.0847.030">
  <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlo
k/requestschema/2006">
    <Request>
      <EMailAddress>Jacob.Alley@emaildomain.com</EMailAddress>
      <AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodisco
er/outlook/responseschema/2006a</AcceptableResponseSchema>
    </Request>
  </Autodiscover>
</Trace>
<Trace Tag="AutodiscoverConfiguration" Tid="8" Time="2016-11-16 18:41:58Z">
 failed: WebException (The underlying connection was closed: Could not establis
 trust relationship for the SSL/TLS secure channel.)
</Trace>
<Trace Tag="AutodiscoverConfiguration" Tid="8" Time="2016-11-16 18:41:58Z">
Trying to call Autodiscover for Jacob.Alley@emaildomain.com on https://autodisc
ver.emaildomain.com/autodiscover/autodiscover.xml.
</Trace>
<Trace Tag="AutodiscoverRequestHttpHeaders" Tid="8" Time="2016-11-16 18:41:58Z"

POST /autodiscover/autodiscover.xml HTTP/1.1
Content-Type: text/xml; charset=utf-8
Accept: text/xml
User-Agent: ExchangeServicesClient/15.00.0847.030


</Trace>
<Trace Tag="AutodiscoverConfiguration" Tid="8" Time="2016-11-16 18:41:58Z">
 failed: WebException (The remote name could not be resolved: 'autodiscover.emaildomain.com')
</Trace>
<Trace Tag="AutodiscoverConfiguration" Tid="8" Time="2016-11-16 18:41:58Z">
Trying to get Autodiscover redirection URL from http://autodiscover.emaildomain.com/autodiscover/autodiscover.xml.
</Trace>
<Trace Tag="AutodiscoverConfiguration" Tid="8" Time="2016-11-16 18:41:58Z">
Request error: The remote name could not be resolved: 'autodiscover.emaildomain
com'
</Trace>
<Trace Tag="AutodiscoverConfiguration" Tid="8" Time="2016-11-16 18:41:58Z">
No Autodiscover redirection URL was returned.
</Trace>
<Trace Tag="AutodiscoverConfiguration" Tid="8" Time="2016-11-16 18:41:58Z">
Trying to get Autodiscover host from DNS SRV record for emaildomain.com.
</Trace>
<Trace Tag="AutodiscoverConfiguration" Tid="8" Time="2016-11-16 18:41:58Z">
DnsQuery returned error error 'DNS name does not exist' error code 0x0000232B.
</Trace>
<Trace Tag="AutodiscoverConfiguration" Tid="8" Time="2016-11-16 18:41:58Z">
No appropriate SRV record was found.
</Trace>
<Trace Tag="AutodiscoverConfiguration" Tid="8" Time="2016-11-16 18:41:58Z">
No matching Autodiscover DNS SRV records were found.
</Trace>`

我知道我有正确的电子邮件地址/用户名/密码,但我不确定如何破译跟踪信息,或者我是否做错了什么。

【问题讨论】:

    标签: c# visual-studio email exchange-server exchangewebservices


    【解决方案1】:

    如果您查看跟踪,似乎没有为自动发现配置任何 DNS 记录,例如“无法解析远程名称”

    Active Directory 的 SCP 查找成功,但它尝试使用的 URL 与 Web 服务器上的 SSL 证书不匹配“(底层连接已关闭:无法为 SSL/TLS 安全通道建立信任关系"。如果这只是一个开发服务器,您可以通过使用 SSL 绕过来忽略该错误

    System.Net.ServicePointManager.ServerCertificateValidationCallback +=
    (se, cert, chain, sslerror) =>
        {
            return true;
        };
    

    您可以使用 https://testconnectivity.microsoft.com/ 在外部测试自动发现

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-10-16
      • 2018-01-15
      • 2013-11-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-07
      相关资源
      最近更新 更多