I inherited an old ASP.NET 2.0 app that uses the AuthorizeNet.dll. It is difficult for me to tell what version of the DLL we are using as the original developer did not retain the downloaded source code and the DLL does not have an embedded version number.
Nevertheless, the server code is quite simple - it uses the AuthorizationRequest and Gateway objects to receive a GatewayResponse object from Authorize.net. The code has been running smoothly for a long time.
This morning we started receiving hard errors listed below. This is hitting the production Authorize.Net servers - not the sandbox. I am aware that the Sandbox no longer supports TLS 1.0. And yes, we will be upgrading this server to .NET 45 and TLS 1.2.
What is strange is that some transactions do go through. So the connection issues seem to be intermittent.
Can anyone help me figure out where to start looking? Anything in the firewall? Ports? Server addresses? Thanks -- Bryan
[SocketException (0x2746): An existing connection was forcibly closed by the remote host]
System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) +7181331
System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size) +196
[IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.]
System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size) +7154527
System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) +190
System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) +7302834
System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) +214
System.Threading.ExecutionContext.runTryCode(Object userData) +376
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) +0
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) +98
System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) +1131
System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) +88
System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size) +20
System.Net.ConnectStream.WriteHeaders(Boolean async) +360
[WebException: The underlying connection was closed: An unexpected error occurred on a send.]
05-17-2017 12:26 PM
Sometimes intermittent errors like this can be cause by malformed data being sent to the API.
Is your application calling https://secure2.authorize.net/gateway/transact.dll or https://api.authorize.net/xml/v1/request.api ?
05-17-2017 02:42 PM - edited 05-17-2017 02:50 PM
If your application uses a firewall to filter outbound connections, make sure that the firewall is set to allow outbound traffic to flow to the Akamai cloud by configuring your outbound firewall to “ANY.”
If your application connects to Authorize.Net directly via an IP address, you will need to update it to connect via domain name.
Connecting directly via an IP address is strongly discouraged as merchants will not receive the benefits of routing through Akamai, and could suffer a loss of service if transactions are re-routed among our various data centers.
05-17-2017 03:01 PM