Copied to clipboard

Flag this post as spam?

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


  • Genc Kastrati 86 posts 401 karma points
    Jul 07, 2020 @ 13:03
    Genc Kastrati
    0

    Localhost upgrade error "A connection string is configured but Umbraco could not connect to the database."

    Hi! I am trying to upgrade from 7.15.5 by going through an intermediate version like 8.2.6 before going to 8.6.6. This is because of a bug that doesnt allow direct upgrade from 7.15.5 to 8.6.6, but when I copy the MDF file from my 7.15.5 version onto the new clean 8.2.6, I get this error:

    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)
      at Umbraco.Core.Runtime.CoreRuntime.DetermineRuntimeLevel(IUmbracoDatabaseFactory databaseFactory, IProfilingLogger profilingLogger)
      at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer)
    

    Does anyone have an idea on how to make this work? I've been reading various posts but most are about Azure. This is on localhost.

    Versions 7.15.5 and 8.6.6 work on their own using the MDF file, it is very strange.

    Thank you! Genc

  • Aaron 57 posts 405 karma points MVP c-trib
    Jul 07, 2020 @ 13:20
    Aaron
    0

    In your web.config the connection string should look like this:

        <add name="umbracoDbDSN" connectionString="Data Source=|DataDirectory|\Umbraco.sdf;Flush Interval=1;" providerName="System.Data.SqlServerCe.4.0"/>
    

    Where Umbraco.sdf is your database name.

    It should also be located in the App_Data folder.

    If that is correct, check the permissions.

  • Genc Kastrati 86 posts 401 karma points
    Jul 07, 2020 @ 13:21
    Genc Kastrati
    0

    Thank you Aaron, it does look like that, thank you for confirming. When you say permissions you mean SQLExpress database permissions?

  • Aaron 57 posts 405 karma points MVP c-trib
    Jul 07, 2020 @ 13:23
    Aaron
    0

    I was thinking more IIS permissions, but if you are using IIS Express then this shouldn't be an issue.

    I can't be of anymore help, I have only ever migrated Umbraco 7 -> 8 with SQL rather than SQL Compact

  • Genc Kastrati 86 posts 401 karma points
    Jul 08, 2020 @ 08:18
    Genc Kastrati
    0

    I managed to get it work. It seems like there was an issue with my MSSQL installation and how I was adding the mdf file.

    I uninstalled and reinstalled SQL entirely, then I would completely shut down IIS and replace the mdf file. Sometimes however, it seems like it kept the previous mdf file still open so I had to restart, it would then work.

Please Sign in or register to post replies

Write your reply to:

Draft