System.ServiceModel.EndpointNotFoundException while running SQL Azure Data Sync Agent

Symptoms

You might run into one of the two exceptions below while using SQL Azure Data Sync Agent

'Type=System.ServiceModel.EndpointNotFoundException,Message=There was no endpoint listening at https://apidatasync.azure.com/AgentServiceAPI.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.,'

or

'Type=System.ServiceModel.EndpointNotFoundException,Message=There was no endpoint listening at https://syncdatasync.azure.com/AzureSyncService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.,'

Resolution

One possible reason you would get this exception could be because your network is blocking traffic to these services. To resolve the issue please ensure your computer is able to communicate with these services.

https://apidatasync.azure.com

https://syncdatasync.azure.com

For more info regarding IP range for Windows Azure Platform, please refer
to https://blogs.msdn.com/b/narahari/archive/2011/08/01/ip-range-for-windows-azure-platform-identifying-connectivity-issues.aspx