cancel
Showing results for 
Search instead for 
Did you mean: 

Sandbox issues: The underlying connection was closed: An unexpected error occurred on a send.

We're seeing this on a GetCustomerProfile call through the .NET SDK as of this morning. 

 

  "exceptionMessage": "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.",
    "exceptionType": "System.IO.IOException",
    "stackTrace": "   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)\r\n   at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)\r\n   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)\r\n   at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)\r\n   at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)\r\n   at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)\r\n   at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)\r\n   at System.Net.TlsStream.CallProcessAuthentication(Object state)\r\n   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)\r\n   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)\r\n   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n   at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)\r\n   at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)\r\n   at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)\r\n   at System.Net.ConnectStream.WriteHeaders(Boolean async)",

 

 

I just also updated my sdk version, to make sure it was not that. 

 

This was working previous to today without any flaws or issues.

 

Thanks,

 

Jarrod Henry

jarrodh
Member
11 REPLIES 11

System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;

 

Thank you very much . its saved my time 

where we have to add this code?? When i paste this line of code it is showing doesnot exist in the current context