Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dominic Rinaldi 2 posts 72 karma points
    Nov 25, 2021 @ 14:08
    Dominic Rinaldi
    0

    Azure DB connection boot failure on Umbraco 9

    Hi,

    We're having issues connecting to an Azure DB after upgrading to Umbraco 9.

    In Umbraco 8, we were using an additional SQLAuthenticationProvider:

    <SqlAuthenticationProviders>
    <providers>
    <add name="Active Directory Interactive" type="Microsoft.Azure.Services.AppAuthentication.SqlAppAuthenticationProvider, Microsoft.Azure.Services.AppAuthentication" />
    </providers>
    </SqlAuthenticationProviders>
    

    This would allow us to connect to the Azure SQL DB without having to provide username and password.

    In Umbraco 9, we are trying to connect to the same DB in the same way (same ConnectionString) but the following is thrown on boot:

    2021-11-25 13:40:57.372 +00:00 Umbraco.Cms.Infrastructure.Runtime.CoreRuntime [Error] (APP/DW0SDWK00004O/1) (//) Boot Failed
    Umbraco.Cms.Core.Exceptions.BootFailedException: Could not check the upgrade state.
    ---> System.ArgumentException: Keyword not supported: 'authentication'.
    at System.Data.Common.DbConnectionOptions.ParseInternal(Dictionary`2 parsetable, String connectionString, Boolean buildChain, Dictionary`2 synonyms, Boolean firstKey)
    at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Dictionary`2 synonyms)
    at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
    at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
    at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
    at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)
    at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
    at Umbraco.Extensions.DbConnectionExtensions.IsConnectionAvailable(String connectionString, DbProviderFactory factory)
    at Umbraco.Cms.Infrastructure.Persistence.UmbracoDatabaseFactory.get_CanConnect()
    at Umbraco.Cms.Infrastructure.Runtime.RuntimeState.TryDbConnect(IUmbracoDatabaseFactory databaseFactory)
    at Umbraco.Cms.Infrastructure.Runtime.RuntimeState.GetUmbracoDatabaseState(IUmbracoDatabaseFactory databaseFactory)
    --- End of inner exception stack trace ---
    at Umbraco.Cms.Infrastructure.Runtime.RuntimeState.GetUmbracoDatabaseState(IUmbracoDatabaseFactory databaseFactory)
    at Umbraco.Cms.Infrastructure.Runtime.RuntimeState.DetermineRuntimeLevel()
    at Umbraco.Cms.Infrastructure.Runtime.CoreRuntime.DetermineRuntimeLevel()
    

    Has anyone managed to get Umbraco 9 working with Azure SQL DB without username/password?

    Thanks,

    Dom

  • Stherm 16 posts 86 karma points
    Mar 08, 2022 @ 16:13
    Stherm
    0

    I have the same exact problem, did you found any solution to this?

Please Sign in or register to post replies

Write your reply to:

Draft