I've been using the API to push orders into our client's BigCommerce store for quite some time, however, BigCommerce recently began rejecting connections and/or closing connections.
I have been unable to find the root of the problem and I'm hoping that someone has experienced and/or could help find the root of this problem.
The following is the response we are now getting on all Big Commerce API requests:
Message: The underlying connection was closed: An unexpected error occurred on a send.
InnerException: System.IO.IOException: Authentication failed because the remote party has closed the transport stream. at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 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.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.ConnectStream.WriteHeaders(Boolean async)
req = (HttpWebRequest)WebRequest.Create(baseURL);
req.AllowAutoRedirect = true;
req.ContentType = "application/json";
req.Accept = "application/json";
req.Method = "GET";
req.Headers.Add("X-Auth-Client", clientID);
req.Headers.Add("X-Auth-Token", AccessToken);
req.Headers.Add("Authorization", authValue);
using (WebResponse resp = req.GetResponse()) {
if (req.HaveResponse && resp != null) {
using (var reader = new StreamReader(resp.GetResponseStream())) {
jsonResponse = reader.ReadToEnd();
}
}
}
}