-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5692 from Particular/sql-encryption-troubleshooting
Add troubleshooting guidance for SQL Encrypt breaking change
- Loading branch information
Showing
7 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: SQL Persistence Troubleshooting | ||
summary: Tips on what to do when the SQL Persistence is not behaving as expected | ||
component: SQLPersistence | ||
reviewed: 2022-03-24 | ||
related: | ||
- persistence/sql | ||
--- | ||
|
||
## SqlException: certificate chain not trusted | ||
|
||
include: sql-client4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Version 4 of `Microsoft.Data.SqlClient` includes [a breaking change](https://github.com/dotnet/SqlClient/pull/1210) which sets `Encrypt=True` by default. If the client and server are not configured with a valid certificate, this can cause an exception at startup: | ||
|
||
``` | ||
System.Data.SqlClient.SqlException | ||
HResult=0x80131904 | ||
Message=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.) | ||
Source=.Net SqlClient Data Provider | ||
``` | ||
|
||
To fix this, [the SQL Server installation must be updated with a valid certificate and the machine hosting the endpoint must be updated to trust this certificate](https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/enable-encrypted-connections-to-the-database-engine). | ||
|
||
WARNING: It is not recommended to eliminate this warning by adding `Encrypt=False` or `TrustServerCertificate=True` to the connection string. Both of these options leave the endpoint unsecure. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: SQL Server Persistence Upgrade - SqlClient version 4 | ||
summary: How to update to Microsoft.Data.SqlClient version 4 | ||
component: SqlPersistence | ||
reviewed: 2022-03-25 | ||
isUpgradeGuide: true | ||
related: | ||
- transports/upgrades/sqlserver-client4 | ||
--- | ||
|
||
include: sql-client4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: SQL Transport Troubleshooting | ||
summary: Tips on what to do when the SQL Transport is not behaving as expected | ||
component: SQLTransport | ||
reviewed: 2022-03-24 | ||
related: | ||
- transports/sql | ||
--- | ||
|
||
## SqlException: certificate chain not trusted | ||
|
||
include: sql-client4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: SQL Server Transport Upgrade - SqlClient version 4 | ||
summary: How to update to Microsoft.Data.SqlClient version 4 | ||
component: SqlTransport | ||
reviewed: 2022-03-25 | ||
isUpgradeGuide: true | ||
related: | ||
- persistence/upgrades/sql-client4 | ||
--- | ||
|
||
include: sql-client4 |