microsoft / Dynamics-AX-Integration

Dynamics AX Integration samples and demos.
285 stars 356 forks source link

An existing connection was forcibly closed by the remote host #102

Open skirkman1 opened 4 years ago

skirkman1 commented 4 years ago

I'm running into an issue with the DataPackageHandler solution where the connection is being closed in both the ExportPackage and ImportPackage functions.

ExportPackage offending line: var executionId = d365Client.DataManagementDefinitionGroups.ExportToPackage("Integration_Outbound_Flow_01", Guid.NewGuid().ToString(), string.Empty, false, "JDM").GetValue()

ImportPackage offending line: var azureWritableUrlOutput = d365Client.DataManagementDefinitionGroups.GetAzureWriteUrl(new Guid().ToString()).GetValue()

Exception:

System.Net.WebException HResult=0x80131509 Message=The underlying connection was closed: An unexpected error occurred on a send. Source=System StackTrace: at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) at System.Net.HttpWebRequest.GetRequestStream() at Microsoft.OData.Client.HttpWebRequestMessage.GetStream() at Microsoft.OData.Client.ODataRequestMessageWrapper.SetRequestStream(ContentStream requestStreamContent) at Microsoft.OData.Client.QueryResult.ExecuteQuery() at Microsoft.OData.Client.DataServiceRequest.Execute[TElement](DataServiceContext context, QueryComponents queryComponents) at Microsoft.OData.Client.DataServiceContext.InnerSynchExecute[TElement](Uri requestUri, String httpMethod, Nullable1 singleResult, OperationParameter[] operationParameters) at Microsoft.OData.Client.DataServiceContext.Execute[TElement](Uri requestUri, String httpMethod, Boolean singleResult, OperationParameter[] operationParameters) at Microsoft.OData.Client.DataServiceActionQuerySingle1.GetValue() at DataPackageHandler.PackageExporter.ExportPackage(Resources d365Client, String filePath) in C:\temp\DM_API\FileBasedIntegrationSamples\ConsoleAppSamples\DataPackageHandler\PackageExporter.cs:line 20 at DataPackageHandler.Program.Main(String[] args) in C:\temp\DM_API\FileBasedIntegrationSamples\ConsoleAppSamples\DataPackageHandler\Program.cs:line 24

Inner Exception 1: IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

Inner Exception 2: SocketException: An existing connection was forcibly closed by the remote host

adsnaraujo commented 4 years ago

Hi!

Did you resolve your probleam ?