Set Up EWS Internally and Externally

As technology continues to evolve, businesses are finding new ways to streamline their operations and enhance productivity. One way of achieving this is through the integration of Exchange Web Services (EWS) on Exchange Server. It is a powerful tool that enables users to access and manage their email, calendar, and contacts using web services. In this article, we will guide you on how to set up it both internally and externally on Exchange Server.

Internal EWS Configuration

Setting up it internally on Exchange Server is the first step towards ensuring that users have seamless access to their emails, calendars, and contacts. Below is a step-by-step guide on how to configure it internally:

  1. Launch the Exchange Management Shell.
  2. Enter the following command to create a new virtual directory:

New-WebServicesVirtualDirectory -WebsiteName “Default Web Site” -InternalUrl “https://exchangeserver/EWS/Exchange.asmx

  1. Enter the following command to configure the virtual directory:

Set-WebServicesVirtualDirectory -Identity “EWS (Default Web Site)” -InternalUrl “https://exchangeserver/EWS/Exchange.asmx” -ExternalUrl $null

  1. Restart the Internet Information Services (IIS) service to activate the new virtual directory.

External Configuration

Setting up it externally on Exchange Server enables users to access their emails, calendars, and contacts using the internet from anywhere in the world. Below is a step-by-step guide on how to configure it externally:

Set Up EWS Internally and Externally
Set Up EWS Internally and Externally
  1. Obtain a valid SSL certificate from a trusted Certificate Authority (CA).
  2. Assign the SSL certificate to the Default Web Site in IIS.
  3. Configure the external DNS record to point to the public IP address of the Exchange Server.
  4. Configure the firewall to allow traffic on port 443 to the Exchange Server.
  5. Enter the following command to create a new virtual directory :

New-WebServicesVirtualDirectory -WebsiteName “Default Web Site” -InternalUrl “https://exchangeserver/EWS/Exchange.asmx” -ExternalUrl “https://mail.yourdomain.com/EWS/Exchange.asmx

  1. Enter the following command to configure the virtual directory:

Set-WebServicesVirtualDirectory -Identity “EWS (Default Web Site)” -InternalUrl “https://exchangeserver/EWS/Exchange.asmx” -ExternalUrl “https://mail.yourdomain.com/EWS/Exchange.asmx

  1. Restart the IIS service to activate the new virtual directory.

Common Configuration Issues and Solutions

While setting up it on Exchange Server is generally straightforward, there are a few common issues that you may encounter. Below are some of these issues and their solutions:

  1. “The remote server returned an error: (401) Unauthorized”

This error occurs when the user does not have sufficient permissions to access it. To fix this, you need to grant the user the necessary permissions using the Exchange Management Shell.

  1. “The Autodiscover service could not be located”

This error occurs when the Autodiscover service is not correctly configured. To fix this, you need to ensure that the Autodiscover service is running and that the DNS record is correctly configured.

  1. “The remote name could not be resolved”

This error occurs when the Exchange Server cannot resolve the external URL. To fix this, you need to ensure that the DNS record is correctly configured and that the firewall is allowing traffic on

Frequently Asked questions

What is Exchange web services?

It is a web-based API that allows developers to interact with Exchange servers programmatically.

Why do I need to set up Exchange web services?

It provides several benefits to organizations that use Microsoft Exchange Server, including easy integration, enhanced performance, remote access, and cross-platform compatibility.

How do I test Exchange web services ?

You can test it using the Exchange Web Services Managed API or the Exchange Server Remote Connectivity Analyzer.

Don’t forget to support us by following us on Google News or Returning to the home page TopicsTalk

Join Telegram and WhatsApp for More updates

Follow us on social media

About Sushil G

Hi, my name is Sushil and I am an experienced content writer with a passion for technology. For the past 10 years, I have been specializing in Microsoft products like Azure AD, Exchange, Skype for Business (SFB), and Teams. My in-depth knowledge of these products has enabled me to help many individuals and businesses to achieve their goals by leveraging the power of Microsoft technology. As a content writer, I enjoy taking complex technical concepts and breaking them down into easy-to-understand language. I'm always eager to learn about the latest trends and advancements in the industry and share my knowledge and expertise with others. If you need help in understanding Microsoft products and maximizing their potential, I'm here to help.