Console APP migrated from .net core 2.2 to .net core 3.1 stopped allowing external HTTPs calls
You can try downgrading the TLS version from 1.2 to 1.0 by adding this line into your Dockerfile (runtime image)
RUN sed -i "s|TLSv1.2|TLSv1.0|g" /etc/ssl/openssl.cnf
When using net5
and a recent Data.SqlClient lib, only setting TLS to 1.0 can cause a deadlock when executing a query.
# downgrade min TLS version to support older unpatched SQL Server (i.e. SQL Server 2008R2)# you should patch those machines to support TLSv1.2 though# see: https://support.microsoft.com/en-us/help/3135244/kb3135244-tls-1-2-support-for-microsoft-sql-serverRUN sed -i "s|MinProtocol = TLSv1.2|MinProtocol = TLSv1|g" /etc/ssl/openssl.cnf && \ sed -i 's|CipherString = DEFAULT@SECLEVEL=2|CipherString = DEFAULT@SECLEVEL=1|g' /etc/ssl/openssl.cnf
While this workaround probably is what you need immediately, applying the fix for SQL Server is what you (or your ops team) should do in the near future.