diff --git a/src/SoapCore/SoapCore.csproj b/src/SoapCore/SoapCore.csproj index f2d01ab6..c45fb390 100644 --- a/src/SoapCore/SoapCore.csproj +++ b/src/SoapCore/SoapCore.csproj @@ -2,7 +2,7 @@ SOAP protocol middleware for ASP.NET Core - 1.1.0.46 + 1.1.0.47 Digital Design netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0 SoapCore @@ -35,20 +35,24 @@ + + + + diff --git a/src/SoapCore/SoapEndpointMiddleware.cs b/src/SoapCore/SoapEndpointMiddleware.cs index 4b9421d5..4aba2bde 100644 --- a/src/SoapCore/SoapEndpointMiddleware.cs +++ b/src/SoapCore/SoapEndpointMiddleware.cs @@ -7,12 +7,14 @@ using System.Net.Http.Headers; using System.Reflection; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using System.Security.Authentication; using System.ServiceModel; using System.ServiceModel.Channels; using System.Text; using System.Threading.Tasks; using System.Xml; +using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Mvc; @@ -324,6 +326,10 @@ private async Task ProcessOperation(HttpContext httpContext, IServiceProvider se { status = StatusCodes.Status400BadRequest; } + else if (ex is ConnectionResetException) + { + status = StatusCodes.Status400BadRequest; + } responseMessage = CreateErrorResponseMessage(ex, status, serviceProvider, requestMessage, messageEncoder, httpContext); }