{"id":3419,"date":"2019-04-08T19:47:08","date_gmt":"2019-04-08T17:47:08","guid":{"rendered":"https:\/\/mariusbancila.ro\/blog\/?p=3419"},"modified":"2019-04-08T14:03:32","modified_gmt":"2019-04-08T12:03:32","slug":"enabling-tls-12-in-your-dotnet-framework-applications","status":"publish","type":"post","link":"https:\/\/mariusbancila.ro\/blog\/2019\/04\/08\/enabling-tls-12-in-your-dotnet-framework-applications\/","title":{"rendered":"Enabling TLS 1.2 in your .NET framework applications"},"content":{"rendered":"<p>A functionality of one of the products I&#8217;m working on suddenly stopped working without any code changes on our side. Our application connects to a web service to get some data and that no longer worked, our customers getting the following error in their logs &#8220;The underlying connection was closed: An unexpected error occurred on a send.&#8221; The first thing to do was checking whether the web service was still up and running as expected. The requests made with SoapUI or Postman were all successful, so it was actually something in our application that was actually wrong. So I decided to use Fiddler to look at how our requests look and what do we get back. The following showed up in Fiddler:<\/p>\n<p><!-- more --><\/p>\n<pre class=\"lang:default decode:true \" >CONNECT service.domain.com:443 HTTP\/1.1\r\nHost: service.domain.com\r\nConnection: Keep-Alive\r\n\r\nA SSLv3-compatible ClientHello handshake was found. Fiddler extracted the parameters below.\r\n\r\nVersion: 3.1 (TLS\/1.0)\r\nRandom: 5C A7 54 A4 88 BF B9 CF 77 EF DC E8 5F 3E 24 39 8E 2B 77 7D 9B 18 3A 34 61 EE 4E EF 71 85 87 F4\r\n\"Time\": 2057-05-13 23:28:12 PM\r\nSessionID: empty\r\nExtensions: \r\n\tserver_name\tservice.domain.com\r\n\telliptic_curves\tunknown [0x1D), secp256r1 [0x17], secp384r1 [0x18]\r\n\tec_point_formats\tuncompressed [0x0]\r\n\tSessionTicket\tempty\r\n\textended_master_secret\tempty\r\n\trenegotiation_info\t00\r\nCiphers: \r\n\t[C00A]\tTLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA\r\n\t[C009]\tTLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA\r\n\t[C014]\tTLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA\r\n\t[C013]\tTLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA\r\n\t[0035]\tTLS_RSA_AES_256_SHA\r\n\t[002F]\tTLS_RSA_AES_128_SHA\r\n\t[000A]\tSSL_RSA_WITH_3DES_EDE_SHA\r\n\r\nCompression: \r\n\t[00]\tNO_COMPRESSION<\/pre>\n<blockquote><p>fiddler.network.https&gt; HTTPS handshake to service.domain.com (for #6) failed. System.IO.IOException Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. &lt; An existing connection was forcibly closed by the remote host <\/p><\/blockquote>\n<p>Apart from the time that was off-scale, the piece of info that drew my attention was the version, TLS 1.0. And that rang some bells about discontinuing support for this version of Transport Layer Security in some of the services we are consuming. So that looked like it happened before we had a chance to do something about it in this application that is built with C++ and .NET (the service being consumed from a .NET module). <\/p>\n<p>Our target .NET framework version is 4.6.2 and by default the runtime should default to TLS 1.2. Yet, it did not work. I was able to reproduce with a demo C++ and C# application that uses a .NET class library that connects to the service. When the C# application is running it works well. When the C++ application is running, using the same class library to go to the service, it does not work. And that was the case even when I set the target to .NET framework 4.7.2 (in both the .NET class library and the C++ console project). According to all the Microsoft documents that I could find it should work well for 4.6 and above, but in my case it did not and cannot really explain it. But, there are two ways to solve this problem. <\/p>\n<p>The first method involves making changes in the registry. By setting the Windows Registry key <tt>HKEY_LOCAL_MACHINE\\SOFTWARE\\[Wow6432Node\\]Microsoft\\.NETFramework\\&lt;VERSION&gt;: SchUseStrongCrypto<\/tt> to 1 you enable strong cryptography that uses more secure network protocols and blocks those that are not secure. Yet, according to documentation, when I target .NET framework 4.7.2 in my application it should be implicitly set to 1:<\/p>\n<blockquote><p>If your app targets .NET Framework 4.6 or later versions, this key defaults to a value of 1. That&#8217;s a secure default that we recommend. If your app runs on .NET Framework 4.6, but targets an earlier version, then the key defaults to 0. In that case, you should explicitly set its value to 1.<\/p><\/blockquote>\n<p>You can set this by running the following commands in a command prompt running as administrator:<\/p>\n<pre class=\"lang:default decode:true \" >reg add HKLM\\SOFTWARE\\Microsoft\\.NETFramework\\v4.0.30319 \/v SchUseStrongCrypto \/t REG_DWORD \/d 1 \/reg:64\r\nreg add HKLM\\SOFTWARE\\Microsoft\\.NETFramework\\v4.0.30319 \/v SchUseStrongCrypto \/t REG_DWORD \/d 1 \/reg:32 <\/pre>\n<p>Beware, this will affect all the .NET applications running on the machine, although that shouldn&#8217;t necessarily be a bad thing.<\/p>\n<p>The second method requires code changes. You can turn on TLS 1.1 and 1.2 by executing the following line of code:<\/p>\n<pre class=\"lang:c# decode:true \" >System.Net.ServicePointManager.SecurityProtocol |= \r\n    SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;<\/pre>\n<p>This should be run before you do any HTTP requests to web services in the application. This line of code does not remove support on the client side for TLS 1.0 but instructs the runtime to negociate the best of a list of available protocols that includes TLS 1.1 and 1.2. Of course, this will affect only your application and not the others running on the same machine.<\/p>\n<p>To read more about this, see the following:<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/framework\/network-programming\/tls\" target=\"_blank\" rel=\"noopener noreferrer\">Transport Layer Security (TLS) best practices with the .NET Framework<\/a><\/li>\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/28286086\/default-securityprotocol-in-net-4-5\" target=\"_blank\" rel=\"noopener noreferrer\">Default SecurityProtocol in .NET 4.5<\/a><\/li>\n<li><a href=\"https:\/\/blogs.perficient.com\/2016\/04\/28\/tsl-1-2-and-net-support\/\" target=\"_blank\" rel=\"noopener noreferrer\">TLS 1.2 and .NET Support: How to Avoid Connection Errors<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A functionality of one of the products I&#8217;m working on suddenly stopped working without any code changes on our side. Our application connects to a web service to get some data and that no longer worked, our customers getting the following error in their logs &#8220;The underlying connection was closed: An unexpected error occurred on a send.&#8221; The first thing to do was checking whether the web service was still up and running as expected. The requests made with SoapUI or Postman were all successful, so it was actually something in our application that was actually wrong. So I decided to use Fiddler to look at how our requests look and what do we get back.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","advgb_blocks_editor_width":"","advgb_blocks_columns_visual_guide":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[13,11,7],"tags":[454,451,482,588],"class_list":["post-3419","post","type-post","status-publish","format-standard","hentry","category-net","category-csharp","category-c","tag-net","tag-c","tag-security","tag-tls"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\n\t<meta name=\"description\" content=\"This article shows how to enable TLS 1.2 for your .NET framework applications both programmatically and with changes in the Windows Registry.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Marius Bancila\"\/>\n\t<meta name=\"keywords\" content=\".net,c#,c++,tls,security\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/mariusbancila.ro\/blog\/2019\/04\/08\/enabling-tls-12-in-your-dotnet-framework-applications\/\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Marius Bancila&#039;s Blog | About code. Mostly on C++\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Enabling TLS 1.2 in your .NET framework applications\" \/>\n\t\t<meta property=\"og:description\" content=\"This article shows how to enable TLS 1.2 for your .NET framework applications both programmatically and with changes in the Windows Registry.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/mariusbancila.ro\/blog\/2019\/04\/08\/enabling-tls-12-in-your-dotnet-framework-applications\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-04-08T17:47:08+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-04-08T12:03:32+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Enabling TLS 1.2 in your .NET framework applications\" \/>\n\t\t<meta name=\"twitter:description\" content=\"This article shows how to enable TLS 1.2 for your .NET framework applications both programmatically and with changes in the Windows Registry.\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2019\\\/04\\\/08\\\/enabling-tls-12-in-your-dotnet-framework-applications\\\/#article\",\"name\":\"Enabling TLS 1.2 in your .NET framework applications\",\"headline\":\"Enabling TLS 1.2 in your .NET framework applications\",\"author\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#organization\"},\"datePublished\":\"2019-04-08T19:47:08+02:00\",\"dateModified\":\"2019-04-08T14:03:32+02:00\",\"inLanguage\":\"en-US\",\"commentCount\":3,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2019\\\/04\\\/08\\\/enabling-tls-12-in-your-dotnet-framework-applications\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2019\\\/04\\\/08\\\/enabling-tls-12-in-your-dotnet-framework-applications\\\/#webpage\"},\"articleSection\":\".NET, C#, C++, .NET, C++, security, TLS\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2019\\\/04\\\/08\\\/enabling-tls-12-in-your-dotnet-framework-applications\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/#listItem\",\"name\":\"IT\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/#listItem\",\"position\":2,\"name\":\"IT\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/#listItem\",\"name\":\"Software\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/#listItem\",\"position\":3,\"name\":\"Software\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/net\\\/#listItem\",\"name\":\".NET\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/#listItem\",\"name\":\"IT\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/net\\\/#listItem\",\"position\":4,\"name\":\".NET\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/net\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/net\\\/csharp\\\/#listItem\",\"name\":\"C#\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/#listItem\",\"name\":\"Software\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/net\\\/csharp\\\/#listItem\",\"position\":5,\"name\":\"C#\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/net\\\/csharp\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2019\\\/04\\\/08\\\/enabling-tls-12-in-your-dotnet-framework-applications\\\/#listItem\",\"name\":\"Enabling TLS 1.2 in your .NET framework applications\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/net\\\/#listItem\",\"name\":\".NET\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2019\\\/04\\\/08\\\/enabling-tls-12-in-your-dotnet-framework-applications\\\/#listItem\",\"position\":6,\"name\":\"Enabling TLS 1.2 in your .NET framework applications\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/net\\\/csharp\\\/#listItem\",\"name\":\"C#\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#organization\",\"name\":\"Marius Bancila's Blog\",\"description\":\"About code. Mostly on C++\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/\",\"name\":\"Marius Bancila\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2019\\\/04\\\/08\\\/enabling-tls-12-in-your-dotnet-framework-applications\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a84dd2831d955c38355ddea55df4df260809b88f36408bc14fd4eab8f7f131c9?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Marius Bancila\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2019\\\/04\\\/08\\\/enabling-tls-12-in-your-dotnet-framework-applications\\\/#webpage\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2019\\\/04\\\/08\\\/enabling-tls-12-in-your-dotnet-framework-applications\\\/\",\"name\":\"Enabling TLS 1.2 in your .NET framework applications\",\"description\":\"This article shows how to enable TLS 1.2 for your .NET framework applications both programmatically and with changes in the Windows Registry.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2019\\\/04\\\/08\\\/enabling-tls-12-in-your-dotnet-framework-applications\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2019-04-08T19:47:08+02:00\",\"dateModified\":\"2019-04-08T14:03:32+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/\",\"name\":\"Marius Bancila's Blog\",\"description\":\"About code. Mostly on C++\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Enabling TLS 1.2 in your .NET framework applications","description":"This article shows how to enable TLS 1.2 for your .NET framework applications both programmatically and with changes in the Windows Registry.","canonical_url":"https:\/\/mariusbancila.ro\/blog\/2019\/04\/08\/enabling-tls-12-in-your-dotnet-framework-applications\/","robots":"max-image-preview:large","keywords":".net,c#,c++,tls,security","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mariusbancila.ro\/blog\/2019\/04\/08\/enabling-tls-12-in-your-dotnet-framework-applications\/#article","name":"Enabling TLS 1.2 in your .NET framework applications","headline":"Enabling TLS 1.2 in your .NET framework applications","author":{"@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/mariusbancila.ro\/blog\/#organization"},"datePublished":"2019-04-08T19:47:08+02:00","dateModified":"2019-04-08T14:03:32+02:00","inLanguage":"en-US","commentCount":3,"mainEntityOfPage":{"@id":"https:\/\/mariusbancila.ro\/blog\/2019\/04\/08\/enabling-tls-12-in-your-dotnet-framework-applications\/#webpage"},"isPartOf":{"@id":"https:\/\/mariusbancila.ro\/blog\/2019\/04\/08\/enabling-tls-12-in-your-dotnet-framework-applications\/#webpage"},"articleSection":".NET, C#, C++, .NET, C++, security, TLS"},{"@type":"BreadcrumbList","@id":"https:\/\/mariusbancila.ro\/blog\/2019\/04\/08\/enabling-tls-12-in-your-dotnet-framework-applications\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/mariusbancila.ro\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/#listItem","name":"IT"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/#listItem","position":2,"name":"IT","item":"https:\/\/mariusbancila.ro\/blog\/category\/it\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/#listItem","name":"Software"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/#listItem","position":3,"name":"Software","item":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/#listItem","name":".NET"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/#listItem","name":"IT"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/#listItem","position":4,"name":".NET","item":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/csharp\/#listItem","name":"C#"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/#listItem","name":"Software"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/csharp\/#listItem","position":5,"name":"C#","item":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/csharp\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/2019\/04\/08\/enabling-tls-12-in-your-dotnet-framework-applications\/#listItem","name":"Enabling TLS 1.2 in your .NET framework applications"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/#listItem","name":".NET"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/2019\/04\/08\/enabling-tls-12-in-your-dotnet-framework-applications\/#listItem","position":6,"name":"Enabling TLS 1.2 in your .NET framework applications","previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/csharp\/#listItem","name":"C#"}}]},{"@type":"Organization","@id":"https:\/\/mariusbancila.ro\/blog\/#organization","name":"Marius Bancila's Blog","description":"About code. Mostly on C++","url":"https:\/\/mariusbancila.ro\/blog\/"},{"@type":"Person","@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author","url":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/","name":"Marius Bancila","image":{"@type":"ImageObject","@id":"https:\/\/mariusbancila.ro\/blog\/2019\/04\/08\/enabling-tls-12-in-your-dotnet-framework-applications\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/a84dd2831d955c38355ddea55df4df260809b88f36408bc14fd4eab8f7f131c9?s=96&d=mm&r=g","width":96,"height":96,"caption":"Marius Bancila"}},{"@type":"WebPage","@id":"https:\/\/mariusbancila.ro\/blog\/2019\/04\/08\/enabling-tls-12-in-your-dotnet-framework-applications\/#webpage","url":"https:\/\/mariusbancila.ro\/blog\/2019\/04\/08\/enabling-tls-12-in-your-dotnet-framework-applications\/","name":"Enabling TLS 1.2 in your .NET framework applications","description":"This article shows how to enable TLS 1.2 for your .NET framework applications both programmatically and with changes in the Windows Registry.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/mariusbancila.ro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/mariusbancila.ro\/blog\/2019\/04\/08\/enabling-tls-12-in-your-dotnet-framework-applications\/#breadcrumblist"},"author":{"@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author"},"datePublished":"2019-04-08T19:47:08+02:00","dateModified":"2019-04-08T14:03:32+02:00"},{"@type":"WebSite","@id":"https:\/\/mariusbancila.ro\/blog\/#website","url":"https:\/\/mariusbancila.ro\/blog\/","name":"Marius Bancila's Blog","description":"About code. Mostly on C++","inLanguage":"en-US","publisher":{"@id":"https:\/\/mariusbancila.ro\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Marius Bancila's Blog | About code. Mostly on C++","og:type":"article","og:title":"Enabling TLS 1.2 in your .NET framework applications","og:description":"This article shows how to enable TLS 1.2 for your .NET framework applications both programmatically and with changes in the Windows Registry.","og:url":"https:\/\/mariusbancila.ro\/blog\/2019\/04\/08\/enabling-tls-12-in-your-dotnet-framework-applications\/","article:published_time":"2019-04-08T17:47:08+00:00","article:modified_time":"2019-04-08T12:03:32+00:00","twitter:card":"summary","twitter:title":"Enabling TLS 1.2 in your .NET framework applications","twitter:description":"This article shows how to enable TLS 1.2 for your .NET framework applications both programmatically and with changes in the Windows Registry."},"aioseo_meta_data":{"post_id":"3419","title":"Enabling TLS 1.2 in your .NET framework applications","description":"This article shows how to enable TLS 1.2 for your .NET framework applications both programmatically and with changes in the Windows Registry.","keywords":[{"label":".NET","value":".NET"},{"label":"C#","value":"C#"},{"label":"C++","value":"C++"},{"label":"TLS","value":"TLS"},{"label":"security","value":"security"}],"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-03-18 21:03:35","updated":"2025-12-12 07:53:21","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"author_meta":{"display_name":"Marius Bancila","author_link":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/"},"featured_img":null,"jetpack_publicize_connections":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Marius Bancila","author_link":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/"},"uagb_comment_info":3,"uagb_excerpt":"A functionality of one of the products I'm working on suddenly stopped working without any code changes on our side. Our application connects to a web service to get some data and that no longer worked, our customers getting the following error in their logs \"The underlying connection was closed: An unexpected error occurred on&hellip;","coauthors":[],"tax_additional":{"categories":{"linked":["<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/\" class=\"advgb-post-tax-term\">.NET<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/csharp\/\" class=\"advgb-post-tax-term\">C#<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/\" class=\"advgb-post-tax-term\">C++<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">.NET<\/span>","<span class=\"advgb-post-tax-term\">C#<\/span>","<span class=\"advgb-post-tax-term\">C++<\/span>"]},"tags":{"linked":["<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/\" class=\"advgb-post-tax-term\">.NET<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/\" class=\"advgb-post-tax-term\">C++<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/\" class=\"advgb-post-tax-term\">security<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/\" class=\"advgb-post-tax-term\">TLS<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">.NET<\/span>","<span class=\"advgb-post-tax-term\">C++<\/span>","<span class=\"advgb-post-tax-term\">security<\/span>","<span class=\"advgb-post-tax-term\">TLS<\/span>"]}},"comment_count":"3","relative_dates":{"created":"Posted 8 years ago","modified":"Updated 8 years ago"},"absolute_dates":{"created":"Posted on April 8, 2019","modified":"Updated on April 8, 2019"},"absolute_dates_time":{"created":"Posted on April 8, 2019 7:47 pm","modified":"Updated on April 8, 2019 2:03 pm"},"featured_img_caption":"","series_order":"","jetpack_shortlink":"https:\/\/wp.me\/pYNdv-T9","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts\/3419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/comments?post=3419"}],"version-history":[{"count":7,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts\/3419\/revisions"}],"predecessor-version":[{"id":3426,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts\/3419\/revisions\/3426"}],"wp:attachment":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/media?parent=3419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/categories?post=3419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/tags?post=3419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}