Error: unable to read data from the transport connection: an existing connection was forcibly closed

CNC3D
Visitor
2 0 0

We have .NET application that uses the Shopify API, it's been working fine for a long time since 2018 when you last updated security protocols. We managed to fix the issue then by using TLS1.2 as security protocol.


We now have the same issue again for the last 4 days, I have tried using TLS1.3 but issue persists.


See vb.NET method for setting credential:


Private Shared Function GetCredential(ByVal url As String) As CredentialCache
ServicePointManager.Expect100Continue = True
'ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3

'ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls

'testing
'ServicePointManager.SecurityProtocol = 3072

'testing 08-09-22 - TLS3
ServicePointManager.SecurityProtocol = 12288


Dim cCache = New CredentialCache
cCache.Add(New Uri(url), "Basic", New NetworkCredential("[REMOVED"))
Return cCache
End Function


Can anyone confirm if I'm on the right track here or what else it might be or what the expected security protocol is now?

The current project is using .NET framework 4.0, could this also be the issue?

Reply 1 (1)

CNC3D
Visitor
2 0 0

So an interesting update...

I've upgraded to .NET framework 4.6 on the local test application. If you run it from VS2010 it causes the error, if you run it from VS2017, it works fine. I'm guessing its downgrading the framework automatically for VS2010?

If I deploy to our web server with 4.6 Framework it returns the error still. Is it possible .NET framework 4.6 is not installed on the server or any other ideas?

I am on shared Windows hosting with GoDaddy and I'm thinking that maybe they don't have .NET framework 4.6 installed?

Been waiting on hold for an hour to them to confirm...