0 votes

Hello! When I try to use the following code, I get an error that the variable "sslprotocols" is unknown. How to fix it, thanks!

client.SSLConfiguration.EnabledSslProtocols = SslProtocols.Tls;
by (660 points)

1 Answer

0 votes

I assume you have not imported proper namespace (System.Security.Authentication.SslProtocols):

client.SSLConfiguration.EnabledSslProtocols = 
    System.Security.Authentication.SslProtocols.Tls12;
by (297k points)
was this confirmed as the answer? I am having the same issue.
SslProtocols enum is definitely in System.Security.Authentication namespace (Assemblies: System.Net.Primitives.dll, System.dll, netstandard.dll)
...