"NameResolutionFailure exception" occurs when using Server-Side Synchronization

Symptoms

After you click Test and Enable on a mailbox record in Dynamics 365, you encounter one of the following errors:

  • Email cannot not be received for the mailbox <Mailbox Name> because the email server location or the incoming email port specified in the associated email server profile <Email Server Profile Name> is incorrect. The mailbox didn't synchronize. The owner of the email server profile has been notified.

  • Mailbox <Mailbox Name> didn't synchronize appointments, contacts, and tasks because the email server location or the incoming email port specified in the associated email server profile <Email Server Profile Name> is incorrect. The owner of email server profile has been notified.

  • The email message "Test Message" cannot be sent because the email server location or the outgoing email port specified in the associated email server profile is incorrect. Mailbox <Mailbox Name> didn't synchronize. The owner of the email server profile <Email Server Profile Name> has been notified.


Each of the errors above also includes the following error code:

Email Server Error Code:Web server returned 1 NameResolutionFailure exception.

Cause

This error can occur if one of the Server Location values in the email server profile record are not correct or if the wrong port is specified within the Advanced section.

Resolution

Within Dynamics 365, open the email server profile record associated with the mailbox. Verify the Server Location values and also the ports within the Advanced section.

If the values are correct, make sure the email server location is accessible by the Dynamics 365 service. For example: If you are using Dynamics 365 (online) with Exchange on-premises, your Exchange Web Services (EWS) URL needs to be accessible over the internet.

More Information

When you click View Details, you see error details like the following:

T:124
ActivityId: <GUID>
>Exception : Unhandled Exception: Microsoft.Exchange.WebServices.Data.ServiceRequestException: The request failed. The remote name could not be resolved: '<server location>'   at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.BuildEwsHttpWebRequest()    at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.BeginExecute(AsyncCallback callback, Object state)    at Microsoft.Crm.Asynchronous.EmailConnector.MonitoredExchangeService.BeginSyncFolderHierarchy(AsyncCallback callback, Object state, FolderId syncFolderId, PropertySet propertySet, String syncState, ExchangeItemType exchangeItemType)    at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeSyncSteps.SyncFolderHierarchyStep.BeginRequest()    at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeSyncSteps.ExchangeSyncAsyncRemoteStep`2.BeforeCall()    at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeSyncSteps.ExchangeSyncAsyncRemoteStep`2.Execute()    at Microsoft.Crm.As...


ActivityId: <GUID>
>Error : System.Net.WebException: The remote name could not be resolved: '<server location>'
   at System.Web.Services.Protocols.WebClientAsyncResult.WaitForResponse()
   at System.Web.Services.Protocols.WebClientProtocol.EndSend(IAsyncResult asyncResult, Object& internalAsyncState, Stream& responseStream)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)
   at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeServiceBinding.EndFindItem(IAsyncResult asyncResult)
   at Microsoft.Crm.Asynchronous.EmailConnector.FindItemsStep.EndCall()
   at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeIncomingEmailProviderStep.EndOperation()


ActivityId: <GUID>
>Error : System.Net.WebException: The remote name could not be resolved: '<server location>'
   at System.Web.Services.Protocols.WebClientAsyncResult.WaitForResponse()
   at System.Web.Services.Protocols.WebClientProtocol.EndSend(IAsyncResult asyncResult, Object& internalAsyncState, Stream& responseStream)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)
   at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeServiceBinding.EndCreateItem(IAsyncResult asyncResult)
   at Microsoft.Crm.Asynchronous.EmailConnector.ExchangeOutgoingEmailProvider.EndCreateItem()

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Any additional feedback? (Optional)

Thank you for your feedback!

×