Friday, 17 August 2018

The underlying connection was closed: An unexpected error occurred on a send. Error Source in dynamcis 365

Error Message: The underlying connection was closed: An unexpected error occurred on a send. Error Source: Microsoft.OData.Client Error Inner Exception:    at Microsoft.OData.Client.HttpWebRequestMessage.GetResponse()
   at Microsoft.OData.Client.DataServiceContext.GetResponseHelper(ODataRequestMessageWrapper request, IAsyncResult asyncResult, Boolean handleWebException)
   at Microsoft.OData.Client.QueryResult.ExecuteQuery()
   at Microsoft.OData.Client.DataServiceRequest.GetQuerySetCount(DataServiceContext context)

   at Microsoft.OData.Client.DataServiceQueryProvider.ReturnSingleton[TElement](Expression expression)

https://community.dynamics.com/ax/f/33/t/227417
can you try this one
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
Adding this line of code on connection

No comments:

Post a Comment

DefaultDimension in d365 FO X++

 Navigate to PurchTable methods you can find with DefaultDimension this.DefaultDimension = this.mergeDimension(this.getDefaultDimension(),th...