Search code examples
sql-serverazureumbraco

Deploying Umbraco 8.1.1 to Azure w/SQL Azure DB: Boot Failed


I'm trying to develop an Umbraco 8.1.1 site on Azure and am following these steps:

  • I create an Azure SQL server database (I don't use any local DB at all).
  • I create an empty ASP.NET 4.7 Web App locally and add Umbraco 8.1.1 via NuGet
  • I invoke locally and configure my Umbraco application to use the Azure SQL Server DB. It works without issue. I can see the database from SQL Server Management Studio no problem.

I then publish the site through Visual Studio 2019 to an Azure Web App, and when I visit it, I get the following error:

Server Error in '/' Application.

Boot failed: Umbraco cannot run. See Umbraco's log file for more details.

-> Umbraco.Core.Exceptions.BootFailedException: A connection string is configured but Umbraco could not connect to the database. at Umbraco.Core.RuntimeState.DetermineRuntimeLevel(IUmbracoDatabaseFactory databaseFactory, ILogger logger) in d:\a\1\s\src\Umbraco.Core\RuntimeState.cs:line 194 at Umbraco.Core.Runtime.CoreRuntime.DetermineRuntimeLevel(IUmbracoDatabaseFactory databaseFactory, IProfilingLogger profilingLogger) in d:\a\1\s\src\Umbraco.Core\Runtime\CoreRuntime.cs:line 259 at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer) in d:\a\1\s\src\Umbraco.Core\Runtime\CoreRuntime.cs:line 146

I'm stumped. How do you configure Umbraco to use an Azure SQL DB?


Solution

  • Check that you've got the connection string registered in the Web App correctly - I suggest looking at the Configuration section for the Web App and setting the configuration string there. Alternatively, download your web.config file via ftp and compare the connection string in the published version vs. your local version.

    You should also check the server or database firewall settings and make sure that Azure services have access:

    https://learn.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure#connecting-from-azure