Open sebastienros opened 3 years ago
Gopinadh is currently trying to apply this workaround 2 in a PR
string ManagedNetworkingAppContextSwitch = "Switch.Microsoft.Data.SqlClient.UseManagedNetworkingOnWindows";
AppContext.SetSwitch(ManagedNetworkingAppContextSwitch, true);
This could be added here:
Because it's only happening on SQL Azure AND Windows Docker, we should try to detect this environment before applying this code. This is very rare since most docker hosts are Linux based.
SQL Azure can be detected with *.database.azure.com
.
Windows can be detected with System.Environment
Docker can be detected with this ENV: DOTNET_RUNNING_IN_CONTAINER
When starting an Orchard instance from the public docker image, trying to use SQL Azure results in this exception:
Root cause: https://github.com/dotnet/SqlClient/issues/714