You have to set the InvariantGlobalization value to false.
<PropertyGroup>
<InvariantGlobalization>false</InvariantGlobalization>
</PropertyGroup>
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
We have a .Net core Web API application
we have created the server image (Alpine) and trying to host it in docker environment where MSSQL is already installed and configured.
when we try to up the container,
we get this error =>
,"Context":"", "Details":"","Message":"Server initialized with errors. Failed to update server public url and tls certificate thumbprint.System.Globalization.CultureNotFoundException: Only the invariant culture is supported in globalization-invariant mode. See [https://aka.ms/GlobalizationInvariantMode](https://aka.ms/GlobalizationInvariantMode"Follow link") for more information. (Parameter 'name')\nen-us is an invalid culture identifier.\n at System.Globalization.CultureInfo.GetCultureInfo(String name)\n at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry, SqlConnectionOverrides overrides)\n at Microsoft.Data.SqlClient.SqlConnection.Open(SqlConnectionOverrides overrides)\n at Microsoft.Data.SqlClient.SqlConnection.Open()\n at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerConnection.OpenDbConnection(Boolean errorsExpected)\n at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected)\n at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open(Boolean errorsExpected)\n
We have gone through several technical vlogs and found that others are also facing the same error in similar environment.'
below are my findings :-
Note - In my project, we are not using any culture i.e we're using Invariant culture.
Please provide some help on this..
Is this a known bug in .Net release i.e will .Net6 project won't work with alpine image and MSSQL?
OR, any other way to resolve this issue.
Thanks
You have to set the InvariantGlobalization value to false.
<PropertyGroup>
<InvariantGlobalization>false</InvariantGlobalization>
</PropertyGroup>