Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when install framwork on SQL db #1746

Closed
beolafsen opened this issue Oct 30, 2021 · 6 comments
Closed

Error when install framwork on SQL db #1746

beolafsen opened this issue Oct 30, 2021 · 6 comments

Comments

@beolafsen
Copy link
Contributor

Tried to install Oqtane on a SQL server. Have done that on the same sql server before - but now I got this error:
(OK installation on LocaleDB)

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 untrusted entity

image

@sbwalker
Copy link
Member

sbwalker commented Nov 2, 2021

Microsoft seems to have introduced some breaking changes in .NET 6 related to enabling encryption by default for SQL Server. I was unable to install Oqtane on LocalDB on .NET 6 until I added Encrypt=false to the connection string. Here is a related thread:

dotnet/SqlClient#1312

It appears there is a new version of SqlClient available v4.0.0-preview3.21293.2 - perhaps this will resolve the issue.

@sbwalker
Copy link
Member

sbwalker commented Nov 3, 2021

Oqtane has been upgraded to latest SqlClient v4.0.0-preview3.21293.2 - please try again.

@sbwalker
Copy link
Member

sbwalker commented Nov 3, 2021

On Aug 25, 2021 Microsoft included this item in the release notes for Microsoft.Data.SqlClient 4.0.0-preview1.21237.2:

"Encrypt default value set to true

The default value of the Encrypt connection setting has been changed from false to true. With the growing use of cloud databases and the need to ensure those connections are secure, it's time for this backwards-compatibility-breaking change."

Currently Oqtane does not provide an explicit value for encryption in the connection string - which means it now defaults to true on .NET 6 and if your database server is not configured to support encryption it will likely result in errors. I believe the solution is to add an option to the SQL Server configuration component so that the user can specify if they wish to use encryption. This option would not be required for LocalDB as it does not support encryption.

sbwalker added a commit that referenced this issue Nov 3, 2021
fix #1746 - SQL Server installation needs to allow configuration of encryption setting on .NET 6
@sbwalker
Copy link
Member

sbwalker commented Nov 3, 2021

problem should now be resolved - get the latest code and try an installation on SQL Server and specify False for the new Encryption option that was added to the installation UI.

@beolafsen
Copy link
Contributor Author

It works fine now'

@sbwalker
Copy link
Member

sbwalker commented Nov 5, 2021

Microsoft recommended also adding a SQL Server config option for Trust Server Certificate - which is described here:

https://docs.microsoft.com/en-us/sql/relational-databases/native-client/features/using-encryption-without-validation?view=sql-server-ver15

So I will add this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants