Copied to clipboard

Flag this post as spam?

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


  • Julius Goddard 38 posts 149 karma points
    Feb 23, 2024 @ 15:49
    Julius Goddard
    0

    A connection string is configured but Umbraco could not connect to the database.

    I am trying to connect to a local database using a simple Umbraco v8 project but am unable to due to the 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) 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 290
      at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer) in d:\a\1\s\src\Umbraco.Core\Runtime\CoreRuntime.cs:line 169
    

    I have used a fair few connection strings in the Web.config file: the most recent being:

    <add name="umbracoDbDSN" connectionString="Server=xxxxxxx; Database=Docs; user id=Docs; password=1234567890" providerName="System.Data.SqlClient" />
    

    Is there anything wrong with the syntax above - I have tried about 50 other combinations of Connection string and none have worked.

    and yes... Windows and SQL Authentication mode box has been ticked.

    Thanks

  • Simon Napper 84 posts 254 karma points
    Feb 23, 2024 @ 16:05
    Simon Napper
    0

    Hi Julius,

    I think you left your example connection string out of your post...

    Simon

  • Julius Goddard 38 posts 149 karma points
    Feb 23, 2024 @ 16:09
    Julius Goddard
    0

    thanks for letting me know - post edited

  • Simon Napper 84 posts 254 karma points
    Feb 23, 2024 @ 16:23
    Simon Napper
    0

    I'm sure it's not this, but it's not something simple like the server name in your connection string is it?

    I'm assuming you're using SQL Server? Sometimes local servers can get a bit funky with the naming and you need something like servername\instancename to connect.

  • Julius Goddard 38 posts 149 karma points
    Feb 26, 2024 @ 08:08
    Julius Goddard
    0

    I've checked - this is what the server name looks like in SSMS: enter image description here

    And this is what I have on my connection string exactly:

    connectionString="Server=80D-LWIN-114\SQLEXPRESS02; Database=Docs; user id=Docs; password=1234567890"

    I can't spot any error - can anyone else?

  • Simon Napper 84 posts 254 karma points
    Feb 26, 2024 @ 08:30
    Simon Napper
    0

    If you use those credentials in SQL Server Management Studio, can you access the database ok? Does you're sql account have db owner set for that db?

  • Julius Goddard 38 posts 149 karma points
    Feb 26, 2024 @ 09:09
    Julius Goddard
    0

    Yes I can access the database, and I did set the owner of the database while I was setting it up

  • Julius Goddard 38 posts 149 karma points
    Feb 26, 2024 @ 14:11
    Julius Goddard
    100

    Turning off Firewall resolved the issue.

Please Sign in or register to post replies

Write your reply to:

Draft