-
-
Notifications
You must be signed in to change notification settings - Fork 597
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
How can EFCore.BulkExtensions influence DbContext connection sequence? #700
Comments
Not sure about this issue. |
I guess that if the issue was from package signing than the project itself wouldn't run or even build correctly, |
Also first time seeing this. |
Tried it just now. |
Have you also tried with latest source v6 ? |
We had the same issues with 6.2.3, though we were upgrading from 6.0.9 so not sure where the bug appeared. Somehow the connection string or underlying code is telling EF core to use SSL encyrption. Adding TrustServerCertificate will work around the issue. -- this is the connection string that causes the issue for us:
"ConnectionString": "Server=localhost;Database=MxHuskyBaan;Trusted_Connection=True"
-- this will work around the issue
"ConnectionString": "Server=localhost;Database=MxHuskyBaan;Trusted_Connection=True;TrustServerCertificate=true;" On our SQL 2019 instance we don't have any SSL certificates installed. Not sure where in the code its being enabled. We are using .Net 6 in our application. |
All the issue seems to be related to the changes in 6.1.5 where Microsoft.Data.SqlClient was bumped to v4.0.0. The issue itself is caused by the following change Microsoft made. |
@borisdj it might be worth adding to the readme, Microsoft.EntityFrameworkCore.SqlServer v6.0.x is using version 2.1.4. So when using this package you are bumped from 2.1.4 to 4.0 with multiple breaking changes. |
SqlClient dependency down to 2.1 |
With v6.5.0+ dependency Microsoft.Data.SqlClient is upgraded to 4.1.0. since dotnet/ |
A fresh new console project using VS 2022 and .NET 6:
https://github.com/uhfath/TestBulkExtensionsError
Only
EFCore.BulkExtensions
andMicrosoft.EntityFrameworkCore.SqlServer
packages added with a simpleDbContext
and one model.When connecting to a remote SQL Server 2019 instance without
EFCore.BulkExtensions
package installed everything works as expected.However, when simply installing the
EFCore.BulkExtensions
package I get the following exception (partially in Russian, so let me know if a translation needed):I'm not sure how
EFCore.BulkExtensions
package is influencing but the exception happens only when it's installed in the project.Also, when testing the same test app with a local instance with and without
EFCore.BulkExtensions
everything works fine.A connection string used for a remote server looks like this:
Any ideas how these could be related?
P.S. SQL Server 2019 Standard was installed with all the default settings on a Windows Server 2019 Standard.
I've never had this kind of an issue with my other projects using
EFCore.BulkExtensions
with this server. But they are .Net Core 2x and 3x versions (with old version ofEFCore.BulkExtensions
).The text was updated successfully, but these errors were encountered: