Troubleshooting EWS Requests for Exchange Online Public Folders
Question details
Exchange Online public-folder requests via the EWS API are returning internal server errors or ErrorNoRespondingCASInDestinationSite.

- Product
- Exchange Online
- Device & OS
- not provided
- Scenario
- Developers or administrators are using the EWS API for enumerating folders or using pull subscriptions within Exchange Online public folders.
- Observed behavior
- The server throws internal server errors or ErrorNoRespondingCASInDestinationSite due to underlying issues with authentication, mailbox routing, or request headers.
Gather your complete EWS XML request payloads, including authentication methods, target public-folder addresses, and the exact error responses received from the server.
Configure EWS Routing Headers Correctly
Ensure that your API requests include the required routing headers to target the correct Client Access Server in Exchange Online.
When accessing Exchange Online public folders via EWS, improper routing often triggers internal server errors or ErrorNoRespondingCASInDestinationSite. Exchange requires specific headers to correctly route requests to the server hosting the active public folder.
Add the 'X-AnchorMailbox' header to your EWS request and set its value to the primary SMTP address of the public folder mailbox you are trying to access.
Include the 'X-PreferServerAffinity' header and set it to 'true' to maintain session affinity with the specific Client Access Server (CAS) processing your request.
Confirm that the user account utilized for EWS authentication has explicit Read or Owner permissions granted on the target public folder.

Consult the Office Developer Community
Escalate the issue to specialized Exchange engineers if standard routing adjustments do not resolve the EWS server errors.
Discover WPS Office for Your Daily Productivity Needs
While resolving complex server-side Exchange configurations, ensure your team stays productive with WPS Office. It provides a lightweight, highly compatible, and user-friendly alternative to the traditional Microsoft Office suite.
- 1. Download WPS Office: Visit the official WPS website to download the free, lightweight installer.
- 2. Install the suite: Run the installer and follow the quick on-screen prompts to set up the software.
- 3. Open your files: Launch WPS Office to immediately begin creating, viewing, or editing your documents seamlessly.

Frequently Asked Questions
What does ErrorNoRespondingCASInDestinationSite mean in Exchange EWS?
This error indicates that Exchange Web Services cannot locate an available Client Access Server (CAS) in the destination site to handle the request. It typically happens when the EWS request lacks proper routing headers, such as X-AnchorMailbox, which guide the request to the correct server node.
Why is the X-AnchorMailbox header required for public folder access?
Exchange Online utilizes massive server farms and load balancing. The X-AnchorMailbox header explicitly tells the routing infrastructure which specific mailbox server hosts the data you are requesting, bypassing generic routing logic that often leads to internal server errors.
Can I use pull subscriptions on Exchange Online public folders?
Yes, pull subscriptions are supported for Exchange Online public folders via the EWS API. However, because public folders can span multiple mailboxes, you must strictly implement X-PreferServerAffinity and X-AnchorMailbox headers to maintain the necessary connection without dropping affinity.




