0 votes

Hi,

Our application is still using .Net Framework 4.0.
As a result, I could not specify TLS 1.2

However, your sample code does use SSLConfiguration.EnabledSslProtocols to enable TLS 1.2.

I would like to know how that is possible because my SMTP client does not have that property on .NET Framework 4.0.

It seems your code is using newer version of .Net framework.
Is that correct? If yes, my application using .NET Framework could not enable TLS 1.2 unless I have to upgrade to .NET Framework.

Thanks

smtp.SSLConfiguration.EnabledSslProtocols = 
    (SecurityProtocolType)3072;
by

1 Answer

0 votes

It is possible to use TLS 1.2 in applications targeting earlier .NET framework versions.

However .NET 4.5 must be installed on the machine.

After you have .NET 4.5 installed, your 2.0 – 4.0 app will use the 4.5 System.dll and you can enable TLS 1.2 using this code:

smtp.SSLConfiguration.EnabledSslProtocols = 
    (SecurityProtocolType)3072;
by (297k points)
...