-
Notifications
You must be signed in to change notification settings - Fork 286
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 after upgrading 5.1.5 to 5.2.0 on linux container #2385
Comments
@pwasiewicz can you test with default instance name to see if that works? What I want to be checked is DataSource without |
Try changing your connection string to specify port OR named instance, not both. |
Yes, it worked. We had other SQL Connection with port only and no issues here.
Is it for investigation purposes or workaround? That database is provided by customer, we cannot change to port or named instance "just like that". Connection to completely different sq; server works when using port only. |
Both. It confirms that specifying both port and instance name is the scenario that is broken, when running on Linux or macOS. Specifying only one or the other is the workaround. Previous behavior was to ignore the instance name if port is specified. Instance name is just a nice way to dynamically look up the port against the SQL Browser service anyway. We will be fixing this in a hotfix to 5.2. |
Addressed in #2395. |
Describe the bug
We had connection string like this used in 5.1.5:
After upgrading library to 5.2.0 we have experienced exception - but only when app was run on linux (from docker container using newest .NET 8 SDK image). The same code runs fine on Windows 11.
Downgrading to 5.1.5 solved issue.
To reproduce
From linux docker container:
Expected behavior
Connection opens w/o issues.
Further technical details
Microsoft.Data.SqlClient version: 5.2.0
.NET target: net8.0
SQL Server version: (e.g. SQL Server 2017): SQL Server 2019
Operating system: Docker container - mcr.microsoft.com/dotnet/aspnet:8.0
The text was updated successfully, but these errors were encountered: