ServicePointManager
CS-S1007The SecurityProtocol
property of ServicePointManager
specifies the protocol used by the ServicePoint
. The SecurityProtocolType.Tls
protocol should ideally be avoided and a more comprehensive and robust protocol should be used in general. It is recommended that you review this configuration and choose a suitable alternative.
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls2 | SecurityProtocolType.Tls3;
// Alternatively, let the OS choose the best default
ServicePointManager.SecurityProtocol = SecurityProtocolType.SystemDefault;