Failed to deploy NuGet package
- Failed to deploy NuGet package 'IronPdf.Native.Chrome.Windows(version)'
- System.Net.WebException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
- 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
Why does this happens?
NuGet has removed support for TLS 1.0 and 1.1 as of June 15, 2020 and TLS1.2 is not enabled.
Using http does not fix the situation because NuGet redirects to https now that TLS1.2 is enforced.
How do I resolve this?
1. In Windows, check that the Visual C++ run-times are installed
3. In Visual Studio, select Tools -> Extensions and Updates -> Updates -> Visual Studio Gallery > Update NuGet Package Manager
4. Alternatively, paste the following into a .reg file and run it. Then try running your NuGet command (no reboot required).
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319] "SchUseStrongCrypto"=dword:00000001 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319] "SchUseStrongCrypto"=dword:00000001