zarigueya
zarigueya

Reputation: 21

EWS always return ErrorTimeZone when you call with timezone UTC

Note: First of all, sorry for my poor level of English.

I'm having trouble with all the requests to EWS (using managed api) in the environment of a client when I use to create the ExchangeService the timezone Utc (new ExchangeService (ExchangeVersion.Exchange2007_SP1, TimeZoneInfo.Utc);)

The returned error is: ResposeCode = ErrorTimeZone (A time zone with the specified ID could not be found.)

Any idea?

Here you have the log traces an EWS request that returns this error:

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>

Thanks for reading :)

Upvotes: 0

Views: 1735

Answers (2)

David Valcourt
David Valcourt

Reputation: 11

Just following up on this in case someone else stumbles across this. I had a very similar issue after installing Exchange 2016 CU8 (started from CU5). I found that the account with impersonation rights received the 500 error when it made the GetServerTimeZone call. This was due to the account not being mailbox enabled and thus not having a timezone assigned to it. Once I mail enabled the account, the error went away and service was restored.

Microsoft acknowledged that this isn't expected behavior and submitted it for a bugcheck.

Upvotes: 1

zarigueya
zarigueya

Reputation: 21

The problem was that for some reason none of the exchange CAS in the production environment of the client had the UTC time zone defined in your windows registry.

I was able to access the owa of the client and saw that I couldn't set the UTC time zone in the owa settings. This convinced them to check if the UTC time zone had properly set in one of their CAS. And as it was not, I asked for set manually de utc time zone in the windows registry. Then I configured my application for attack only to this CAS, and all worked well.

Researching the client told me that everything was caused by a patch of exchange they had recently applied and they had already identified and tested in their environment of pre-production another patch that fixed it.

Upvotes: 2

Related Questions