We have a .NET 4.7+ application running on an Azure Cloud App Service. When we try to call and API that has TLS 1.2 minimum, using HttpWebRequest, we get a "The request was aborted: Could not create SSL/TLS secure channel" error. What I have read so far:
- Microsoft strongly advises against hard coding
ServicePointManager.SecurityProtocol
, so I'm trying to avoid that solution unless it's absolutely necessary. Microsoft's guide - .NET 4.7+ should default to TLS 1.2 or use the OS configuration. On my Azure app, TLS 1.2 is set as the minimum Microsoft's guide
What can be causing my app to be using a lower TLS version? I have searched the code and could not find a manual TLS configuration anywhere. Is setting ServicePointManager.SecurityProtocol
really my only solution?
ServicePointManager.SecurityProtocol
is sometime required (in older Windows Systems, mainly) – Wolcott