0

I'm using Umbraco CMS v7.4 with SQL Server 2014, the project was working fine until a few hours ago, when an error started showing up:

Umbraco cannot start. A connection string is configured but the Umbraco cannot connect to the database

The error occurs when I tried to open the website, see the image below:

enter image description here

I tried the following:

  • Checked to see if SQL Server is running
  • Checked the connection string credentials in web.config

Any help is appreciated.

5 Answers 5

2

After a few tries, even I loaded the backed up DB, I found that it caused by the DB login, the user in the connection string was having a password expiration enabled (the password had expired).

So, this is what I did:

  • Open the SQL server
  • Logged in as the user used in the connection string
  • Created a new password
  • Updated the web.config connection string "Password"

Hope this will help

1
  • Am still facing the same issue on azure, my connection strings seem correct, even when I run locally the website works , but it fails when I publish it on azure app services Jun 4, 2020 at 23:28
1

So, in my case I tried to get started with the existing project. I got all the files, restored DB backup locally, made sure all permissions are set for IIS AppPool user etc. But I kept getting the error in question. It turns out that I cannot use server=localhost;database=... in connection string. After I replaced it with server=.\;database=..., it started to work right away.

1
  • Is this with regard with azure ? Jun 4, 2020 at 23:27
1

Also note that if you're running it in Azure with an Azure SQL database you'll have to go to the Azure SQL Server settings and under "Firewalls and virtual networks" you'll need to tick "Yes" for "Allow Azure services and resources to access this server".

0

I was getting this error when running an Umbraco project locally, with the DB pointing to an instance on Azure. In that case, this problem happens if you haven't allowed the IP access within the Server Firewall of the DB in Azure.

You can fix this by finding out your IP and then adding it to the DB:

  • Click All Resources within your Azure portal, then click on the SQL Database your project points to.
  • Click Set Server Firewall on the right-side window.
  • Add in your IP as the start and end points, and call it something memorable.
  • Click Save and once you get the confirmation message that It has been applied, refresh your site locally.
1
  • My firewall is set, but still having the issue, actually am using Azure SQL and am hosting my Umbraco on azure. The other surprising thing the site was working , then later I found the error Jun 4, 2020 at 23:27
0

I experienced the same problem and here is how I fixed it.

  • Right-click on your localhost in SSMS and select Properties
  • Got to the Security page and select "Select authentication" as "SQL Server and Windows Authentication mode"
  • Hit OK.
  • Go to Services and find your SQL Server service and restart it.
  • Check your local umbraco website now, you should be able to see it without any issues. If you still have problems, then you might need to check your local setup and permissions.
  • Further details are below and on this blog post. enter image description here enter image description here enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.