locked
[Help]: System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send! RRS feed

  • Question

  • User2089379676 posted

    Hi Everyone!

    After I upgraded OS to Windows Server 2019 Std.

    My Application is ERROR:

    "System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send.
    ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
    ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    --- End of inner exception stack trace ---
    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
    at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
    at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
    at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
    at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
    at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
    at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
    at System.Net.ConnectStream.WriteHeaders(Boolean async)
    --- End of inner exception stack trace ---
    at eBiz4DClient.Work.Login(IE_Setup setup)
    at eBiz4DClient.Work.Transfer(IE_Setup setup)

    "

    Can you help me fix Error. Thank!

    Wednesday, June 24, 2020 7:22 AM

All replies

  • User288213138 posted

    Hi Le Lam,

    ystem.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send

    There are many reasons for this error, please post more details information about this error.

    Such as your test environment and code.

    Best regards,

    Sam

    Wednesday, June 24, 2020 9:32 AM
  • User2089379676 posted

    Hi Sam!

    Test Environment: OS: Windows Server 2019 Std, IIS 10

    Application: Web Service

    Link Web Server: https://portal..../FTWebService/FileTransfer.asmx

    Error:

    NO INTERNET CONNECTION AVAILABLE  https://portal..../FTWebService/FileTransfer.asmx   

    This error occurs when i process upgrade OS from Windows Server 2016 Std to Windows Server 2019 Std

    Thank!

    Wednesday, June 24, 2020 9:38 AM
  • User288213138 posted

    Hi Le Lam,

    Test Environment: OS: Windows Server 2019 Std, IIS 10

    Application: Web Service

    Link Web Server: https://portal..../FTWebService/FileTransfer.asmx

    Error:

    NO INTERNET CONNECTION AVAILABLE  https://portal..../FTWebService/FileTransfer.asmx   

    This error occurs when i process upgrade OS from Windows Server 2016 Std to Windows Server 2019 Std

    Here is the same error, you can try this solution.

    https://support.citrix.com/article/CTX245765

    Enforce use of TLS 1.2 on the client machine. Add the following registry entries, so the clients such as MS Excel, PowerShell, LinqPad use TLS 1.2 by default.

    Best regards,

    Sam

    Thursday, June 25, 2020 8:30 AM
  • User2089379676 posted

    OK, Thank Sam!

    I have processing config TLS 1.2 on client machine. It is connect OK.

    Friday, June 26, 2020 2:24 AM