none
Office 365 EWS randomly fails RRS feed

  • Question

  • I'm writing an app that connects to Exchange via EWS Managed API.  It works fine with my 2 on-premise Exchange Servers and with another 3rd party hosted MSX service. However, with O365, it fails randomly on the Item and Folder Bind().  Here is the trace output:

    </Trace>

    EwsRequest

    <Trace Tag="EwsRequest" Tid="32" Time="2012-07-11 21:25:09Z" Version="14.02.0051.000">

      <?xml version="1.0" encoding="utf-8"?>

      <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

        <soap:Header>

          <t:RequestServerVersion Version="Exchange2010_SP1" />

        </soap:Header>

        <soap:Body>

          <m:GetFolder>

            <m:FolderShape>

              <t:BaseShape>AllProperties</t:BaseShape>

            </m:FolderShape>

            <m:FolderIds>

              <t:FolderId Id="AQMkADc2NTE4NjgwLTZkODYtNDFkZS04ZjA0LTFmMGY5YzAxZThkZgAuAAAD/aVipWb10k+lRIllgSAotAEAATJSAGdyCkaIFNe8YDwnPgAAATz6IgAAAA==" />

            </m:FolderIds>

          </m:GetFolder>

        </soap:Body>

      </soap:Envelope>

    </Trace>

    EwsResponseHttpHeaders

    <Trace Tag="EwsResponseHttpHeaders" Tid="32" Time="2012-07-11 21:25:10Z">

    200 OK

    Transfer-Encoding: chunked

    Content-Encoding: gzip

    Vary: Accept-Encoding

    RequestId: b2a38119-f035-45c4-9a48-afcc3d6edf23

    Persistent-Auth: true

    X-DiagInfo: BY2PRD0810CA013

    Cache-Control: private

    Content-Type: text/xml; charset=utf-8

    Date: Wed, 11 Jul 2012 21:25:11 GMT

    Set-Cookie: exchangecookie=0e12de0d96934bd4bf936ea7522b0d38; path=/

    Server: Microsoft-IIS/7.5

    X-AspNet-Version: 2.0.50727

    X-Powered-By: ASP.NET

     

     

    </Trace>

    EwsResponse

    <Trace Tag="EwsResponse" Tid="32" Time="2012-07-11 21:25:10Z" Version="14.02.0051.000">

      <?xml version="1.0" encoding="utf-8"?>

      <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

        <s:Header>

          <h:ServerVersionInfo MajorVersion="14" MinorVersion="16" MajorBuildNumber="164" MinorBuildNumber="8" Version="Exchange2010_SP2" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />

        </s:Header>

        <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

          <m:GetFolderResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">

            <m:ResponseMessages>

              <m:GetFolderResponseMessage ResponseClass="Error">

                <m:MessageText>An internal server error occurred. Try again later.</m:MessageText>

                <m:ResponseCode>ErrorInternalServerTransientError</m:ResponseCode>

                <m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>

                <m:Folders />

              </m:GetFolderResponseMessage>

            </m:ResponseMessages>

          </m:GetFolderResponse>

        </s:Body>

      </s:Envelope>

    </Trace>

     

     

    I have a retry function that sleeps for about 1 sec each time. Makes no difference. The call will work about 10 - 15 secs later (hard to tell really).  It just is unreliable.

     

    The error, in bold, maps to the following description (at http://msdn.microsoft.com/en-us/library/aa580757(v=exchg.80).aspx):

     

    ErrorInternalServerTransientError

    This error indicates that an internal server error occurred and that you should try your request again later.

     

    Looks like throttling but shouldn't it then give me a specific error based on:

    ErrorExceededConnectionCount

    This error -iIndicates that there are more concurrent requests against the server than are allowed by a user's policy.

    ErrorExceededSubscriptionCount

    This error indicates that a user's throttling policy maximum subscription count has been exceeded.

    ErrorExceededFindCountLimit

    This error indicates that a search operation call has exceeded the total number of items that can be returned.

    ErrorServerBusy

    This error occurs when the server is busy.

     

    as per: http://blogs.msdn.com/b/mstehle/archive/2010/11/09/ews-best-practices-understand-throttling-policies.aspx


    Anybody know what can be done here to mitigate? Basically, O365 doesn't work with EWS.

    Thursday, July 19, 2012 1:10 PM

All replies