{"id":1839,"date":"2023-09-27T10:23:43","date_gmt":"2023-09-27T00:23:43","guid":{"rendered":"https:\/\/ntsblog.homedev.com.au\/?p=1839"},"modified":"2023-10-26T21:02:14","modified_gmt":"2023-10-26T10:02:14","slug":"the-certificate-chain-was-issued-by-an-authority-that-is-not-trusted-fixed","status":"publish","type":"post","link":"https:\/\/ntsblog.homedev.com.au\/index.php\/2023\/09\/27\/the-certificate-chain-was-issued-by-an-authority-that-is-not-trusted-fixed\/","title":{"rendered":"The certificate chain was issued by an authority that is not trusted &#8211; FIXED"},"content":{"rendered":"<div id=\"ntsbl-1844616603\" class=\"ntsbl-before-content ntsbl-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-6288941070289539\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:inline-block;width:728px;height:90px;\" \ndata-ad-client=\"ca-pub-6288941070289539\" \ndata-ad-slot=\"9356781486\"><\/ins> \n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>\n<h2 class=\"wp-block-heading\">The Issue<\/h2>\n\n\n\n<p>When moving from EntityFramework v6.0 to v7.0 you may get the following exception.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Microsoft.Data.SqlClient.SqlException : A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)\n---- System.ComponentModel.Win32Exception : The certificate chain was issued by an authority that is not trusted.<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">The fix<\/h2>\n\n\n\n<p>The fix is very simple. Just add the following to the end of your connection string.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>TrustServerCertificate=True;<\/code><\/pre>\n\n\n\n<p>This will stop the error from occurring.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Issue When moving from EntityFramework v6.0 to v7.0 you may get the following exception. The fix The fix is very simple. Just add the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[37,13],"tags":[],"class_list":["post-1839","post","type-post","status-publish","format-standard","hentry","category-net-core","category-sql-server"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts\/1839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/comments?post=1839"}],"version-history":[{"count":0,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts\/1839\/revisions"}],"wp:attachment":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/media?parent=1839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/categories?post=1839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/tags?post=1839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}