【问题标题】:EWS always return ErrorTimeZone when you call with timezone UTC当您使用时区 UTC 调用时,EWS 始终返回 ErrorTimeZone
【发布时间】:2014-07-08 13:09:00
【问题描述】:

注意:首先,对不起我的英语水平不佳。

当我使用时区 Utc (new ExchangeService (ExchangeVersion.Exchange2007_SP1, TimeZoneInfo.Utc);) 创建 ExchangeService 时,我在客户端环境中对 EWS(使用托管 api)的所有请求都遇到了问题/p>

返回的错误是:ResposeCode = ErrorTimeZone(找不到指定ID的时区。)

有什么想法吗?

这里有日志跟踪返回此错误的 EWS 请求:

18  2014-05-19 13:52:33,224 6   TRACE   XXXX    SCService.exe   (null)  (null)[EwsResponseHttpHeaders] <Trace Tag="EwsResponseHttpHeaders" Tid="6" Time="2014-05-19 13:52:33Z">
HTTP/1.1 500 Internal Server Error
Content-Length: 1014
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Date: Mon, 19 May 2014 13:52:35 GMT
Server: Microsoft-IIS/6.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET


</Trace>
    (null)
19  2014-05-19 13:52:33,224 6   TRACE   XXXX    SCService.exe   (null)  (null)[EwsResponse] <Trace Tag="EwsResponse" Tid="6" Time="2014-05-19 13:52:33Z" Version="15.00.0516.014">
  <?xml version="1.0" encoding="utf-8"?>
  <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Header>
      <t:ServerVersionInfo MajorVersion="8" MinorVersion="3" MajorBuildNumber="298" MinorBuildNumber="1" Version="Exchange2007_SP1" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" />
    </soap:Header>
    <soap:Body>
      <soap:Fault>
        <faultcode>soap:Client</faultcode>
        <faultstring>A time zone with the specified ID could not be found.</faultstring>
        <detail>
          <e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorTimeZone</e:ResponseCode>
          <e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">A time zone with the specified ID could not be found.</e:Message>
          <t:MessageXml xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
            <t:Value Name="Id">UTC</t:Value>
          </t:MessageXml>
        </detail>
      </soap:Fault>
    </soap:Body>
  </soap:Envelope>
</Trace>

感谢阅读:)

【问题讨论】:

  • 请包含请求或生成请求的代码。仅响应是不足以诊断问题的信息。谢谢。

标签: timezone exchangewebservices exchange-server-2007 managed-ews


【解决方案1】:

问题是由于某种原因,客户端生产环境中的任何交换 CAS 都没有在 Windows 注册表中定义的 UTC 时区。

我能够访问客户端的 owa 并看到我无法在 owa 设置中设置 UTC 时区。这说服了他们检查 UTC 时区是否在他们的 CAS 中正确设置。事实并非如此,我要求在 Windows 注册表中手动设置 de utc 时区。然后我将我的应用程序配置为仅针对此 CAS 进行攻击,并且一切正常。

研究客户告诉我,一切都是由他们最近应用的一个交换补丁引起的,他们已经在他们的预生产环境中确定并测试了另一个修复它的补丁。

【讨论】:

    【解决方案2】:

    只是跟进这个,以防其他人偶然发现这个。安装 Exchange 2016 CU8(从 CU5 开始)后,我遇到了非常相似的问题。我发现具有模拟权限的帐户在调用 GetServerTimeZone 时收到 500 错误。这是由于该帐户未启用邮箱,因此没有为其分配时区。一旦我通过邮件启用了帐户,错误就消失了,服务也恢复了。

    Microsoft 承认这不是预期的行为,并将其提交以进行错误检查。

    【讨论】:

      猜你喜欢
      • 2012-05-17
      • 1970-01-01
      • 2013-02-03
      • 1970-01-01
      • 2016-05-06
      • 1970-01-01
      • 1970-01-01
      • 2021-11-30
      • 2013-02-18
      相关资源
      最近更新 更多