-
Notifications
You must be signed in to change notification settings - Fork 300
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
ef core7 , RemoteCertificateValidationCallback error was throwd in docker container #1856
Comments
Moving to do the SqlClient repo as this isn't related to EF Core. |
@roji |
I have the same problem after migrating to dotnet 7 |
I think the issue comes from the breaking change in Encrypt = SqlConnectionEncryptOption.Optional in your connection string builder and see if that solves the issue. |
thanks, Javad. but I change my connection string from: and it didn't make a difference . I also tried to remove |
Is there any sample project or GitHub repo for asp.net core |
Not that I am aware of. EFCore team may know that better. Have you tried a new simple application with EFCore to see if that works? Just keep in mind that we are in the middle of a GA release and cannot dedicate so much time on the issues at the moment, but we can investigate it later after the GA release. |
Same issue here with EF Core 7 + .NET 7 inside a Lambda docker container. |
Unfortunately I can't use FQDN in my cloud PaaS provider. |
I currently have the same Issue, tried every possibility of the parameters |
New application, new Databases.... tried everything similar to @gjvdree - but still no luck. :-( |
This really needs to be resolved as its a significant breaking change/regression. |
@JRahnama why is this in waiting for customer? It looks like sufficient information has been given and the issue is certainly repeatable. What is the team waiting on from any customer? |
Bump, this is causing several issues here in our dev environment. |
Hey, I got the same error: System.Security.Authentication.AuthenticationException
The remote certificate was rejected by the provided RemoteCertificateValidationCallback.
at System.Net.Security.SslStream.SendAuthResetSignal(ProtocolToken message, ExceptionDispatchInfo exception)
at System.Net.Security.SslStream.CompleteHandshake(SslAuthenticationOptions sslAuthenticationOptions)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
at System.Net.Security.SslStream.AuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthenticationOptions)
at Microsoft.Data.SqlClient.SNI.SNITCPHandle.EnableSsl(UInt32 options) also tried |
We have the same problem which prevents us from upgrading to EF Core 7 yet, as it would break our development pipeline. |
Also having the same issue. Have tried everything above including changing from localhost to the actual IP and port number. |
We just experienced this issue and adding "Trust Server Certificate=True" fix the issue. Within UAT we use managed instances. When connecting to the SQL Browser Agent, the connection simply dies with the same error. We are not happy with the solution but this was fixed by setting the connect to use TCP and set the Instance port directly
|
mssql-scripter doesn't work on Linux due to same bug. |
Please check the code DB context object is added as singleton and the object must be injected from constructor only. The connectionString must be set or re-set (re-load from Configuration appsettings.json) if the object of dbcontext is created separately anywhere in code. |
Any progress on this? We are stuck on EF6 due to this bug because we cannot run our integration tests. |
Any updates regarding this? We are also blocked from migrating to .net 7 until this is fixed |
Is anyone able to provide a sample repo without EFCore that reproduces the issue? |
The following repository seamlessly integrates with ASP.NET Core, .NET 8, and Microsoft SQL Server, demonstrating a smooth and efficient Docker deployment process. |
I updated to EF core version 8.0.1 and simply adding "Encrypt=False" to my connection string solved the callback certificate exception. |
It's also works for me in .NET 8. |
I am also facing the same issue, even with .Net 8 (tried 8.0.1 & 8.0.3), adding Encrypt=False & TrustServerCertificate has no effect, it still expects server certificate validation. More context: Getting below additional stack trace in my case
|
After changing connection string format from |
I try to run an asp.net core api with dotnet7 SDK in a docker container.
I have this connection string:
server=xxx.xxx.xxx.xxx,SqlServerPort;database=DbName;user id=sa;password=DbPassword123;TrustServerCertificate=True;
it works fine on my local pc. but when I run this project in a docker container throws this error:
I use this Dockerfile:
and use this docker-compose file:
I add my dbContext and SQL server ef core provider:
if I downgrade EF Core package version to 6.0.1 its works fine on docker!
EF Core version: 7.0.0
Database provider: (e.g. Microsoft.EntityFrameworkCore.SqlServer)
Target framework: (e.g. .NET 7.0)
Operating system: Windows, Linux
IDE: (e.g. Jetbrains Rider 2022.3 EAP 9)
The text was updated successfully, but these errors were encountered: