I am using Microsoft.Exchange.WebServices.Data to connect to Office 365 outlook and pull emails and its attachments. This works correctly on the local development machine. My moved to a server it does not work and fails with the following error message.
Error: 0 : Exception occurred: The request failed. The underlying connection was closed: An unexpected error occurred on a receive. at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(IEwsHttpWebRequest& request)
at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
at Microsoft.Exchange.WebServices.Data.ExchangeService.FindItems(FolderId parentFolderId, String queryString, ViewBase view)
The firewall has been opened for the fully qualified domain name for outlook.office365.com from the server. The following is the network captured and having successful ack, it still seem to fail. Please let me know what might be the cause of this issue. Thanks,