cancel
Showing results for 
Search instead for 
Did you mean: 

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

Working fine in VS2010 development server, but after deploying on IIS 7 server I am getting the below error.

 

An unexpected error occurred on a send.
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.StartSendBlob(Byte[] incoming, Int32 count, 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.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   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 System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   at System.Net.HttpWebRequest.GetRequestStream()
   at AuthorizeNet.Gateway.SendRequest(String serviceUrl, IGatewayRequest request)
   at AuthorizeNet.Gateway.Send(IGatewayRequest request, String description)
   at SilverTowneWeb.PaymentInfo.Confirm(Decimal total, Int32 orderId) in D:\SilverTowne\SilverTowneWeb\PaymentInfo.aspx.cs:line 214
   at SilverTowneWeb.PaymentInfo.btnSave_Click(Object sender, EventArgs e) in D:\SilverTowne\SilverTowneWeb\PaymentInfo.aspx.cs:line 127

 

Please look into and responed ASAP.

2 REPLIES 2

it that just a problem with secure.authorize.net ? try any other website like yahoo.com ?

Can you get to the secure.authorize.net site in a browser on the server?

 

which API? using the SDKs or custom code?

RaynorC1emen7
Expert

Thanks, the problem was not  related to authorize.net, It was proxy blocking the  secure.authorize.net site.

 

Thanks again.