Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

ExchangeService.FindFolders with WellKnownFolderName.PublicFoldersRoot fails #294

@PhilbyTheGreat

Description

@PhilbyTheGreat

Starting at 12th of April around 6:16pm AEST, calling FindFolders using a WellKnownFolderName.PublicFoldersRoot fails with a "Name cannot begin with the '<' character, hexadecimal value 0x3C. Line 1, position 1775." message. The xml body that we are sending looks like

<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="Exchange2013_SP1" />
<t:DateTimePrecision>Milliseconds</t:DateTimePrecision>
<t:ExchangeImpersonation>
<t:ConnectingSID>
<t:SmtpAddress>obfuscated@obfuscated.com</t:SmtpAddress>
</t:ConnectingSID>
</t:ExchangeImpersonation>
</soap:Header>
soap:Body
<m:FindFolder Traversal="Shallow">
<m:FolderShape>
<t:BaseShape>IdOnly</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="folder:DisplayName" />
</t:AdditionalProperties>
</m:FolderShape>
<m:IndexedPageFolderView MaxEntriesReturned="100" Offset="0" BasePoint="Beginning" />
<m:ParentFolderIds>
<t:DistinguishedFolderId Id="publicfoldersroot" />
</m:ParentFolderIds>
</m:FindFolder>
</soap:Body>
</soap:Envelope>

Using fiddler to examine the response shows something like

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15" MinorVersion="20" MajorBuildNumber="6298"
MinorBuildNumber="30" Version="V2018_01_08"
xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
</s:Header>
<s:Body>
<m:FindFolderResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:FindFolderResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:RootFolder IndexedPagingOffset="1" TotalItemsInView="4" IncludesLastItemInRange="false">
<t:Folders>
<t:Folder>
<t:FolderId Id="<s:Envelope xmlns:s=" http:// schemas.xmlsoap.org/ soap/ envelope/"><s:Header>*</s:Header><s:Body><s:Fault>a:ErrorInternalServerErrorAn internal server error occurred. The operation failed.<e:ResponseCode xmlns:e=" http:// schemas.microsoft.com/ exchange/ services/ 2006/ errors">ErrorInternalServerError</e:ResponseCode><e:Message xmlns:e=" http:// schemas.microsoft.com/ exchange/ services/ 2006/ errors">An internal server error occurred. The operation failed.</e:Message></s:Fault></s:Body></s:Envelope>

This obviously isn't valid xml.

We haven't changed anything for this to start happening. It's been running multiple times a day for months without failure.

This is surely a problem with the https://outlook.office365.com/EWS/Exchange.asmx endpoint, but I thought I'd mention it here in case anyone can help!

Interestingly enough, this failed 27 times in a row and then we started seeing this issue. If we swap to using a different impersonated user (using oauthcredentials), we go back to getting the "Name cannot begin with the '<' character, hexadecimal value 0x3C. Line 1, position 1775." message. I'm not game enough to try enough times to get this user to hit the concurrency limit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions