Umbraco 10.2.0 works in Dev, Boot Failed when deployed to IIS

Hi All
I wonder if anyone has seen this before and knows the answer?

I have Umbraco 10.2.0 working fine in Visual Studio. I deployed (published in Visual Studio) the solution to a server and IIS. When I hit the site I’m getting the Umbraco page with “Boot Failed”.

Looking at the Umbraco logs there is an error as follows:

{"@t":"2022-10-27T08:43:27.4271671Z","@mt":"Acquired MainDom.","SourceContext":"Umbraco.Cms.Core.Runtime.MainDom","ProcessId":16048,"ProcessName":"w3wp","ThreadId":1,"ApplicationId":"74cf166884f37301bd2c621ed34488e3f56042fb","MachineName":"######","Log4NetLevel":"INFO "}
{"@t":"2022-10-27T08:43:27.4810309Z","@mt":"Could not check the upgrade state.","@l":"Warning","@x":"System.ArgumentException: The specified invariant name 'Server=######;Database=######;User Id=######;Password=######' wasn't found in the list of registered .NET Data Providers.
   at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName, Boolean throwOnError)
   at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
   at Umbraco.Cms.Infrastructure.Persistence.DbProviderFactoryCreator.CreateFactory(String providerName)
   at Umbraco.Cms.Infrastructure.Persistence.UmbracoDatabaseFactory.get_DbProviderFactory()
   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)","SourceContext":"Umbraco.Cms.Infrastructure.Runtime.RuntimeState","ProcessId":16048,"ProcessName":"w3wp","ThreadId":1,"ApplicationId":"74cf166884f37301bd2c621ed34488e3f56042fb","MachineName":"######","Log4NetLevel":"WARN "}
{"@t":"2022-10-27T08:43:27.4818093Z","@mt":"Boot Failed","@l":"Error","@x":"Umbraco.Cms.Core.Exceptions.BootFailedException: Could not check the upgrade state.
   ---> System.ArgumentException: The specified invariant name 'Server=######;Database=######;User Id=######;Password=######' wasn't found in the list of registered .NET Data Providers.
   at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName, Boolean throwOnError)
   at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
   at Umbraco.Cms.Infrastructure.Persistence.DbProviderFactoryCreator.CreateFactory(String providerName)
   at Umbraco.Cms.Infrastructure.Persistence.UmbracoDatabaseFactory.get_DbProviderFactory()
   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()","SourceContext":"Umbraco.Cms.Infrastructure.Runtime.CoreRuntime","ProcessId":16048,"ProcessName":"w3wp","ThreadId":1,"ApplicationId":"74cf166884f37301bd2c621ed34488e3f56042fb","MachineName":"######","Log4NetLevel":"ERROR"}

Both the Dev version (in Visual Studio) and the deployed version access the same database, and the IIS server definitely has access to the SQL Server (many other .NET 6 sites using it), and I can’t see any differences in the appsettings.json

Any ideas? Thanks in advance


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/110321-umbraco-1020-works-in-dev-boot-failed-when-deployed-to-iis