-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
EFCore.SqlServer 6.0.1 Untrusted certificate authority error #27062
Comments
It looks like this minor change contains a breaking change from Microsoft.Data.SqlClient 4.0 |
EF Core 6 does not depend on MDS 4.0! You must have an explicit Dependency to that somewhere? |
The IDE says I have an implizit dependency from Microsoft.EntityFrameworkCore.SqlServer. |
Please share your csproj |
I won't be returning to work for the next two weeks. |
@ErikEJ im having the same issue. I've migrated from .net core 3.1 to .net 6 and started getting this error. Downgrading down to 6.0.0 doesn't fix it. |
@ErikEJ adding Is there an issue adding that in? |
@IeuanWalker not if you are on prem |
@ErikEJ what about sql azure? |
Thanks, in this case we are on prem. Few of our other services are azure based, not migrated them yet though so not sure if they will have the same issue |
Hi there! Just faced this issue too - we could no longer make new migrations and/or connect to local DBs, as this error then appeared. `
and `
` I believe that's all of the relevant ones. Hope it helps, and thanks for the work on EF Core - SQL would have been a pain without :) I suspect its EFCore BulkExtensions here that refers o that, since the other packages are at 6.0.0 and not 6.0.1, as others pointed out was where the issue was introduced for them... NB. Adding "trustServerCertificate=true" to our connection strings fixed our issues with not being able to connect to our DBs, when running our micro services locally :) Thanks for that tip! |
EFCore.Bulkextensions explicitly depends on SqlClient 4.0. It should not do that, that is why you are facing breaking changes. I would ask the author to stop doing that, and just use the 2.1 version the EF Core SqlServer package depends on instead. |
SqlClient dependency down to 2.1 |
@ErikEJ Does latest version of EF Core, being 6.0.5, now have dependency to Microsoft.Data.SqlClient 4.0? |
No. It still depends on 2.1.4 as that was the most recent LTS release when 6.0 came out. |
So only EF Core 7 will have newer version ? |
Yes, EF Core 7 already uses version 5: https://github.com/dotnet/efcore/blob/main/src/EFCore.SqlServer/EFCore.SqlServer.csproj#L51 |
FYI, this is error code SEC_E_UNTRUSTED_ROOT 0x80090325 |
You need to have a look at this : |
Thank you very much Opolo! This worked for me:) |
Why is ef core trying to use ssl encrypted connection to connect to database when switching from 6.0.0 to 6.0.1?
When we update EntityFrameworkCore.SqlServer from Version 6.0.0 to Version 6.0.1 we cannot connect to our database anymore because of an untrusted certificate authority error.
It also happens when we try Scaffolding.
ConnectionString:
Data Source=localhost;Initial Catalog=local-Sales;Persist Security Info=True;User ID=sa;Password=sa-local-2019;
StackTrace:
When I add
trustServerCertificate=true
to the connection string it works again:Data Source=localhost;Initial Catalog=local-Sales;Persist Security Info=True;User ID=sa;Password=sa-local-2019;trustServerCertificate=true
Did you made this change on purpose?
I cannot find anything about this change in the documents.
EF Core version: 6.0.1
Database provider: (e.g. Microsoft.EntityFrameworkCore.SqlServer)
Target framework: (e.g. .NET 6.0)
Operating system: Windows 10
IDE: Jetbrains Rider 2021.3.1
The text was updated successfully, but these errors were encountered: