Exchange 2010 SP1 自动发现服务

Exchange 2010 SP1 自动发现服务

我有一个测试 Exchange 2010 SP1 服务器,也作为域控制器运行。我们将使用它作为开发 Exchange 服务器来测试我们自己的 Exchange 相关开发。

域名和 Exchange 运行良好。它可以在帐户之间路由电子邮件等,不会出现问题。连接 Outlook 2010 / 2003 并使用 OWA 在服务器和远程计算机上本地运行良好。它没有面向互联网的路由,这不是必需的。

为了针对 Exchange 提供的 API 进行开发,我们需要使用自动发现服务。但是自动发现服务似乎不起作用。

如果我导航到“https://davedc/Autodiscover/autodiscover.xml“在另一台机器的浏览器中,我没有提示进行身份验证,我看到以下内容:

<?xml version="1.0" encoding="utf-8"?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
  <Response>
    <Error Time="11:17:04.4201807" Id="2459279933">
      <ErrorCode>600</ErrorCode>
      <Message>Invalid Request</Message>
      <DebugData />
    </Error>
  </Response>
</Autodiscover>

然后我使用 PS 来诊断服务:Test-OutlookWebServices -ClientAccessServer“davedc”并返回:

   RunspaceId : daaf1eca-c47e-4069-8e70-6c3816d240dd
Id         : 1019
Type       : Information
Message    : A valid Autodiscover service connection point was found. The Autodiscover URL on this object is https://da
             vedc/Autodiscover/Autodiscover.xml.

RunspaceId : daaf1eca-c47e-4069-8e70-6c3816d240dd
Id         : 1013
Type       : Error
Message    : When contacting https://davedc/Autodiscover/Autodiscover.xml received the error The remote server returned
              an error: (500) Internal Server Error.

RunspaceId : daaf1eca-c47e-4069-8e70-6c3816d240dd
Id         : 1023
Type       : Error
Message    : The Autodiscover service couldn't be contacted.

RunspaceId : daaf1eca-c47e-4069-8e70-6c3816d240dd
Id         : 1113
Type       : Error
Message    : When contacting https://davedc.exch.local:443/Autodiscover/Autodiscover.xml received the error The remote
             server returned an error: (500) Internal Server Error.

RunspaceId : daaf1eca-c47e-4069-8e70-6c3816d240dd
Id         : 1123
Type       : Error
Message    : The Autodiscover service couldn't be contacted.

RunspaceId : daaf1eca-c47e-4069-8e70-6c3816d240dd
Id         : 1013
Type       : Error
Message    : When contacting https://davedc/EWS/Exchange.asmx received the error Client found response content type of
             '', but expected 'text/xml'.
             The request failed with an empty response.

RunspaceId : daaf1eca-c47e-4069-8e70-6c3816d240dd
Id         : 1025
Type       : Error
Message    : [EXCH] Error contacting the AS service at https://davedc/EWS/Exchange.asmx. Elapsed time was 15 millisecon
             ds.

RunspaceId : daaf1eca-c47e-4069-8e70-6c3816d240dd
Id         : 1026
Type       : Success
Message    : [EXCH] Successfully contacted the UM service at https://davedc/EWS/Exchange.asmx. The elapsed time was 15
             milliseconds.

RunspaceId : daaf1eca-c47e-4069-8e70-6c3816d240dd
Id         : 1113
Type       : Error
Message    : When contacting https://davedc.exch.local/EWS/Exchange.asmx received the error Client found response conte
             nt type of '', but expected 'text/xml'.
             The request failed with an empty response.

RunspaceId : daaf1eca-c47e-4069-8e70-6c3816d240dd
Id         : 1125
Type       : Error
Message    : [Server] Error contacting the AS service at https://davedc.exch.local/EWS/Exchange.asmx. Elapsed time was
             15 milliseconds.

RunspaceId : daaf1eca-c47e-4069-8e70-6c3816d240dd
Id         : 1126
Type       : Success
Message    : [Server] Successfully contacted the UM service at https://davedc.exch.local/EWS/Exchange.asmx. The elapsed
              time was 0 milliseconds.

我删除了自动发现VD

Remove-AutodiscoverVirtualDirectory -Identity "davedc\autodiscover (Default Web Site)" -Confirm:$false

然后重新创建

New-AutodiscoverVirtualDirectory -WebsiteName "Default Web Site" -InternalUrl "https://davedc/Autodiscover/Autodiscover.xml" -BasicAuthentication 1 -WindowsAuthentication 1

Set-ClientAccessServer -Identity davedc -AutoDiscoverServiceInternalUri "https://davedc/Autodiscover/Autodiscover.xml"

Get-AutodiscoverVirtualDirectory 报告内部 URL,但测试 Outlook Web 服务结果保持不变。

我该怎么做才能使自动发现正常工作?

[由于我发现 MS 发布命令语法与我需要运行的语法不同,因此进行了彻底编辑]

答案1

已解决。我的一位同事在尝试解决该问题时,在默认网站下的 IIS 中创建了一个额外的 SSL 端口。(我不知道这一点/意识到这可能会导致问题)

梳理事件日志,我发现了此条目。

The service '/Autodiscover/autodiscover.xml' cannot be activated due to an exception during compilation.  The exception message is: This collection already contains an address with scheme https.  There can be at most one address per scheme in this collection. 

从网站上删除额外的 SSL 绑定解决了这个问题。自动发现现在有效。

相关内容