WCF Applications and TLS 1.2

This post has been republished via RSS; it originally appeared at: IIS Support Blog articles.

According to article https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls

 

WCF Supports TLS1.0, 1.1 and 1.2 as the default in .NET Framework 4.7. Starting with .NET Framework 4.7.1, WCF defaults to the operating system configured version,

 

If you are targeting your application to 4.7.1, WCF is configured to allow the OS to choose the best security protocol by default unless explicitly configured. To Target 4.7.1, we need to set < httpRuntime targetFramework="4.7.1" /> in web.config. If not, it will fall back to 4.5 default behavior, it means to select SSL3.0 and TLS1.0 as default protocols.

 

<configuration>

   <system.web>

     < httpRuntime targetFramework="4.7.1" />

   </system.web>

</configuration>

 

This suggests our WCF application would choose TLS1.2 if OS is configured properly.

 

In console app scenario, the same is achieved by setting <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1"/> in your application configuration file.

 

<configuration>

   <startup>

       <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/>

   </startup>

</configuration>

 

Additional information:

 

https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/retargeting/4.5.2-4.7.2

 

https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/startup/supportedruntime-element

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.