Azure Sql connectionstring active directory integration #11840
joostbroekhuizen
started this conversation in
Features and ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be nice if the Umbraco dependency on System.Data.SqlClient could be upgraded to Microsoft.Data.SqlClient. With the use of the current referenced version of SqlClient it is not possible to use active directory integration for the connectionstring on Azure app services.
Connectionstrings like:
Server=tcp:myserver.database.windows.net,1433;Database=sqldb-001-myserver-001;Authentication=Active Directory Integrated;User Id=user;
are not supported. An exception is thrown:
"System.ArgumentException:
Keyword not supported: 'authentication'.\r\n at System.Data.Common.DbConnectionOptions.ParseInternal(Dictionary2 parsetable, String connectionString, Boolean buildChain, Dictionary
2 synonyms, Boolean firstKey)\r\n at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Dictionary2 synonyms)\r\n at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)\r\n at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)\r\n at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)\r\n at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)\r\n at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)\r\n at Umbraco.Extensions.DbConnectionExtensions.IsConnectionAvailable(String connectionString, DbProviderFactory factory)\r\n at Umbraco.Cms.Infrastructure.Persistence.UmbracoDatabaseFactory.get_CanConnect()\r\n at Umbraco.Cms.Infrastructure.Runtime.RuntimeState.TryDbConnect(IUmbracoDatabaseFactory databaseFactory)\r\n at Umbraco.Cms.Infrastructure.Runtime.RuntimeState.GetUmbracoDatabaseState(IUmbracoDatabaseFactory databaseFactory)
This seems to be resolvable by upgrading this SqlClient dependency.
Additional impact, NPoco also needs to be updated to support Microsoft.Data.SqlClient
Beta Was this translation helpful? Give feedback.
All reactions