How to troubleshoot EWS connection by using EWSEditor
You get errors when you use CodeTwo software to connect to (or execute a specific action upon) a mailbox or public folder via the Exchange Web Services (EWS) protocol.
To verify if an error is related to CodeTwo software or to your environment, you can use a tool called EWSEditor to connect to the mailbox or public folder that causes errors and check if the error appears. This can be very useful in scenarios when:
- CodeTwo software cannot establish connection to a mailbox or upload/download required data – see how to connect to and browse mailboxes with EWSEditor
- CodeTwo software cannot access public folders – learn how to connect to public folders via EWSEditor
- CodeTwo software cannot impersonate a mailbox – find out how to use EWSEditor to connect to mailboxes by using impersonation rights
Connecting to a mailbox via EWSEditor
- On the machine where CodeTwo software is installed, go to the EWSEditor page on GitHub and download the bin package.
Alternatively, you can download the file to another computer and then copy it to the one where CodeTwo software is installed.
- Extract the package – EWSEditor is a standalone solution which does not require installation.
- Open the program and click File > New Exchange Service (Fig. 1.).
Fig. 1. Creating a new EWS connection to a mailbox in EWSEditor.
- Use the Autodiscover Email option or manually provide the Service URL by using the FQDN of the machine you are connecting to (CAS server). If you use Office 365, click the 365 Default button (Fig. 2.).
The Service URL for EWS should be as follows:
https://<your machine FQDN>/EWS/Exchange.asmx
for example: https://exchange.example.com/EWS/Exchange.asmx
For more detailed information on the Service URL for EWS, please refer to the following article.
- Configure the authentication options:
Direct access: If you want to access your mailbox directly, select Use the following credentials instead of the default Windows credentials and provide the user name and password for the mailbox account you have problems connecting to (Fig. 3.).
Mailbox impersonation: If you want to connect to another mailbox by using the admin’s credentials, click Use the following credentials instead of the default Windows credentials and provide the administrator’s credentials. After that, select the Check if using EWS Impersonation checkbox and provide the primary SMTP address of the mailbox you want to access.
Fig. 4. Configuring a connection to a mailbox as an administrator, by using impersonation.
- When the configuration is complete, click OK.
- If the connection is successful, you will see a confirmation in the program.
- If the connection is not successful, the software will throw an error. The appearance of any errors means that the mailbox connection problem is not related to CodeTwo software and the problem relates to your environment.
If you are getting Error 500, then probably your XML configuration file for web services (including EWS) is corrupted. Please consider reverting any recent changes made to that file.
Browsing a mailbox
Directly after you finish configuring the connection, you get a prompt asking if you want to add the mailbox root to the tree view. Please confirm by clicking Yes (Fig. 5.).
Fig. 5. The prompt that allows you to browse the mailbox content in EWSEditor.
After the addition is complete, you can browse the content of your mailbox under Root\Top of Information Store (Fig. 6.). If you are getting any errors while accessing any of the folders within that container, it means that the mailbox is corrupted.
Fig. 6. Browsing the content of a mailbox.
Browsing public folders
To browse public folders of a mailbox account that you added to the EWSEditor’s tree view, right-click the name (email address) of the mailbox at the very top of the tree, and select Add Root Folder. After selecting Identify folder by well known name, choose PublicFoldersRoot (Fig. 7.) and click OK.
Fig. 7. Adding public folders to the mailbox tree view.
If you are getting any errors when accessing public folders, this might mean that public folders are not yet created or their creation is still pending. However, if you are getting trouble accessing some particular public folders, it means that you are missing some of the required permissions.
It is worth to check access to every public folder because each public folder may have a different set of access permissions. If you would like to modify these permissions, see the this article.
|Related products:||General (Microsoft 365, Exchange & more)|
|Last modified:||May 11, 2021|
|Created:||September 11, 2018|