Copied to clipboard

Flag this post as spam?

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


  • Jeff Donkersgoed 6 posts 36 karma points
    Jun 03, 2022 @ 16:11
    Jeff Donkersgoed
    0

    Umbraco v10 - Trying fresh install but get connection string error

    I am trying to install Umbraco 10 for the first time and didn't have any issues until I went to run the site (dotnet run). I was expecting a login screen to appear, and then the ability to enter in db info, but the site just hangs. I see an error message in the cmd window referencing a connection string. I think I must be missing a step somewhere? I've watched a walkthrough video though and did everything the presenter did. On our Umbraco 7 sites, I can find a web.config file, but no such thing here which is where I thought I could modify the connection string after the fact (likely because the site isn't built yet?).

    What I did (.NET CLI Installation):

    • Installed .NET SDK v6

    At cmd prompt in the folder I wanted for the site I ran:

    dotnet new -i Umbraco.Templates::10.0.0-rc4
    dotnet new umbraco -n devsite.Site
    

    Moved into the new folder and ran

    dotnet build (which was successful)
    dotnet run
    

    Navigated to the URL (https://localhost:44364) shown where it then just hangs. Below are the cmd window steps.

    E:\CMS Sites\dev_apex>dotnet new -i Umbraco.Templates::10.0.0-rc4
    The following template packages will be installed:
       Umbraco.Templates::10.0.0-rc4
    
    Umbraco.Templates::10.0.0-rc4 is already installed.
    
    E:\CMS Sites\dev_apex>dotnet new umbraco -n dev_apex.Site
    The template "Umbraco Project" was created successfully.
    
    Processing post-creation actions...
    Running 'dotnet restore' on E:\CMS Sites\dev_apex\dev_apex.Site\dev_apex.Site.csproj...
      Determining projects to restore...
      Restored E:\CMS Sites\dev_apex\dev_apex.Site\dev_apex.Site.csproj (in 24.47 sec).
    Restore succeeded.
    
    
    
    E:\CMS Sites\dev_apex>cd dev_apex.Site
    
    E:\CMS Sites\dev_apex\dev_apex.Site>dotnet build
    Microsoft (R) Build Engine version 17.2.0+41abc5629 for .NET
    Copyright (C) Microsoft Corporation. All rights reserved.
    
      Determining projects to restore...
      All projects are up-to-date for restore.
      dev_apex.Site -> E:\CMS Sites\dev_apex\dev_apex.Site\bin\Debug\net6.0\dev_apex.Site.dll
      Copying Umbraco json schema file
    
    Build succeeded.
        0 Warning(s)
        0 Error(s)
    
    Time Elapsed 00:00:07.18
    
    E:\CMS Sites\dev_apex\dev_apex.Site>dotnet run
    Building...
    [11:58:09 INF] Acquiring MainDom.
    [11:58:09 INF] Acquired MainDom.
    [11:58:10 INF] Now listening on: https://localhost:44364
    [11:58:10 INF] Now listening on: http://localhost:9351
    [11:58:10 INF] Application started. Press Ctrl+C to shut down.
    [11:58:10 INF] Hosting environment: Development
    [11:58:10 INF] Content root path: E:\CMS Sites\dev_apex\dev_apex.Site
    [11:58:31 WRN] Umbraco must install or upgrade.
    [11:59:09 ERR] Unhandled exception in recurring hosted service.
    System.InvalidOperationException: The factory has not been configured with a proper connection string.
       at Umbraco.Cms.Infrastructure.Persistence.UmbracoDatabaseFactory.Initialize()
       at System.Threading.LazyInitializer.EnsureInitializedCore[T](T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory)
       at System.Threading.LazyInitializer.EnsureInitialized[T](T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory)
       at Umbraco.Cms.Infrastructure.Persistence.UmbracoDatabaseFactory.EnsureInitialized()
       at Umbraco.Cms.Infrastructure.Persistence.UmbracoDatabaseFactory.get_SqlContext()
       at Umbraco.Cms.Infrastructure.Scoping.ScopeProvider.get_SqlContext()
       at Umbraco.Cms.Infrastructure.Scoping.Scope.get_SqlContext()
       at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.RepositoryBase.get_SqlContext()
       at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.KeyValueRepository.GetBaseQuery(Boolean isCount)
       at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.KeyValueRepository.PerformGet(String id)
       at Umbraco.Cms.Core.Cache.NoCacheRepositoryCachePolicy`2.Get(TId id, Func`2 performGet, Func`2 performGetAll)
       at Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.EntityRepositoryBase`2.Get(TId id)
       at Umbraco.Cms.Core.Services.KeyValueService.GetValue(String key)
       at Umbraco.Cms.Core.Services.MetricsConsentService.GetConsentLevel()
       at Umbraco.Cms.Core.Telemetry.TelemetryService.GetVersion()
       at Umbraco.Cms.Core.Telemetry.TelemetryService.TryGetTelemetryReportData(TelemetryReportData& telemetryReportData)
       at Umbraco.Cms.Infrastructure.HostedServices.ReportSiteTask.PerformExecuteAsync(Object state)
       at Umbraco.Cms.Infrastructure.HostedServices.RecurringHostedServiceBase.ExecuteAsync(Object state)
    
  • Damian 69 posts 392 karma points
    Jun 03, 2022 @ 20:47
    Damian
    0

    Can confirm^.

    I went through this process almost verbatim and could not achieve any result beyond the posted issue. I ultimately decided to not continue with the v10.rc4 install as this didn't seem like a stable start.

    Knowing the upgrade path for v9->v10 will be more like a minor version upgrade - i decided to embrace it rather than continue fighting the v10 install.

    I have no help to offer other than "it's not just you" reassurance and a long-distance high-fiveā€¦ clap!

    good luck :v:

  • Jeff Donkersgoed 6 posts 36 karma points
    Jun 06, 2022 @ 13:53
    Jeff Donkersgoed
    0

    Glad it's not just me and I hope this can be solved! If not, then I will also have to go the v9 route.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jun 06, 2022 @ 06:35
    Sebastiaan Janssen
    0

    The only thing I can think of is that you do need .net 6.0.2 or higher installed, maybe that's it?

    Exact same install steps work for me. Do you even see the install screen?

    enter image description here

    The other thing I'm curious about is what your appSettings.json and appsettings.Development.json look like. The error seems to indicate there might be a problem there, not sure, but please post them in full so we can have a look.

  • Jeff Donkersgoed 6 posts 36 karma points
    Jun 06, 2022 @ 13:52
    Jeff Donkersgoed
    0

    Hi Sebastiaan,

    The only thing I see when I navigate to the https://localhost:44364 is an Umbraco image. It redirects to https://localhost:44364/install?redir=true&url=https://localhost:44364/. There is no page similar to yours shown as expected.

    I have .NET SDK 6.03 installed, so that shouldn't be the issue. I never made any .json changes at all.

    appsettings.json

      {
          "$schema": "./appsettings-schema.json",
          "Serilog": {
            "MinimumLevel": {
              "Default": "Information",
              "Override": {
                "Microsoft": "Warning",
                "Microsoft.Hosting.Lifetime": "Information",
                "System": "Warning"
              }
            }
          },
          "Umbraco": {
            "CMS": {
              "Global": {
                "Id": "8123a9c6-1011-4776-ad45-775c924fc0fb",
                "SanitizeTinyMce": true
              },
              "Content": {
                "ContentVersionCleanupPolicy": {
                  "EnableCleanup": true
                }
              }
            }
          }
        }
    

    appsettings.development.json

    {
      "$schema": "./appsettings-schema.json",
      "Serilog": {
        "MinimumLevel": {
          "Default": "Information"
        },
        "WriteTo": [
          {
            "Name": "Async",
            "Args": {
              "configure": [
                {
                  "Name": "Console"
                }
              ]
            }
          }
        ]
      },
      "Umbraco": {
        "CMS": {
          "Content": {
            "MacroErrors": "Throw"
          },
          "Hosting": {
            "Debug": true
          },
          "RuntimeMinification": {
            "UseInMemoryCache": true,
            "CacheBuster": "Timestamp"
          }
        }
      }
    }
    
  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jun 07, 2022 @ 07:02
    Sebastiaan Janssen
    0

    I think this might be fixed over here for the next RC: https://github.com/umbraco/Umbraco-CMS/pull/12536

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jun 07, 2022 @ 08:57
    Sebastiaan Janssen
    100

    Team says it might not be related.

    Let me get it clear what you're actually seeing, if I understand correctly, you see the blue background like this but without the form to fill in?

    enter image description here

    And if yes, what do you see in your browsers F12 tools (shown at the bottom), any errors, apart from the normal GET https://localhost:44361/install?redir=true&url=https://localhost:44361/ 503 (which indicates Umbraco is not yet installed).

    Does it work in a different browser? A private browsing window?

  • Jeff Donkersgoed 6 posts 36 karma points
    Jun 07, 2022 @ 13:04
    Jeff Donkersgoed
    0

    As an IT guy, I failed twice here: I didn't notice that I was using Internet Explorer rather than Edge; and I didn't think of trying it in a new browser first...

    To answer the first question though, yes, all I saw was the blue background, but no white form to fill in.

    My next step is to get it to run in IIS rather than locally, but I'm sure I can eventually figure that out!

    Thank you!

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jun 07, 2022 @ 13:22
    Sebastiaan Janssen
    0

    Haha no worries! Yes, we absolutely do not support Internet Explorer. Really glad to hear that it runs fine now!

    @Damian is this your problem too?

Please Sign in or register to post replies

Write your reply to:

Draft