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

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

Error:

"The underlying connection was closed: An unexpected error occurred on a send."
This error would be seen in the error log on the FOS server.
Users may also see in FOS that the Vendor is stuck in the Processing New Vendor status and does not update to Waiting for Vendor Reply


Solution:
To resolve this issue add 2 registry entries to the instance to get the FOS SOAP web requests to use the system's TLS version, instead of the .NET Framework v3.5 default.

Entries for 2008 Server TLS 1.2
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions"=dword:00000001

The setting to add may be different for Windows Server 2012 or 2016. The below references may give more info for Windows Server 2012 or 2016.