Open xs2bharat opened 3 weeks ago
Can you confirm if this occurs on other versions of SqlClient?
Can you also try explicitly setting the runtime id as discussed in this thread: https://github.com/dotnet/SqlClient/issues/2030#issuecomment-1946205214
Issue is fixed when switched to docker image mcr.microsoft.com/dotnet/aspnet:6.0.28-alpine3.18
It might be an issue in the .Net platform detection logic not detecting alpine 3.19 as linux.
Tagging subscribers to this area: @davoudeshtehari, @david-engel, @jrahnama See info in area-owners.md if you want to be subscribed.
Maybe https://github.com/dotnet/dotnet-docker/issues/5243 is related?
Describe the bug
Error: System.PlatformNotSupportedException: Microsoft.Data.SqlClient is not supported on this platform.
To reproduce
Use Microsoft.Data.SqlClient" Version="5.2.1" in mcr.microsoft.com/dotnet/aspnet:6.0.28-alpine3.19 image "ConnectionString": "Server=tcp:xxxxxxx.database.windows.net;Initial Catalog=XXXXXXX;Connection Timeout=50"
Expected behavior
Successful connection should be created
Further technical details
Microsoft.Data.SqlClient version: 5.2.1 .NET target: net6.0 SQL Server version: Azure SQL Database Managed Instance, Windows Server 2022 Datacenter (10.0) Operating system: Docker container - mcr.microsoft.com/dotnet/aspnet:6.0.28-alpine3.19
Additional context Add any other context about the problem here.