I have the same issue and tried all the above suggestion solutions including
checking the web config connection string, database restore to last backup etc. but still no luck
The site is setup in Umbraco 7.2 and using SQL Express.
It was working fine until yesterday, suddenly started to throw the error
"A connection string is configured but umbraco cannot connect to the database"
Not only I have the same issue. This issue only appears to me when I set up the site in IIS.
When I use VisualStudio IIS Express there's not a problem.
But when I removed "Integrated Security=true" and used a database account to login it fixed the problem. So it could be the security setting on your database too.
The error is intermittent, and happens at different times, but seems now to be happening all the time on my site. Literally nothing changed between it working and suddenly not working. It still works perfectly on my localhost version, only on the hosted version of the site which is an exact replica.
If anyone has any fix for this, please share! I am completely stuck on this one.
This one also worked for us. We connect to the database with integrated security. In the app pool > advanced settings we've also had to enter the windows account data under 'Identity' to get it to work.
If it's not permissions, and if the database is an SQL Server CE file, you can also get this error if it is being locked by another user / process. Visual Studio may have it's hands on the file, especially if you are running the site through VS, so close that and see how you get on.
Hi guys i have downloaded 7.5.6 using nuget. Iam targeting 4.6.1 framework and its an MVC application. when i run the soluton its not showing install screen.
I hve created new db in SQL 2014 and then create connection string for this database in UmbracoDSN setting in web config.
Ritesh is correct - first create a blank database and assign it a user with dbo permissions.
However, don't edit the web.config as this will be done when you first run the site. It will prompt you and ask which database you are going to use, and when you select "Custom" and put in the details of the SQL Server database, along with your username and password, the Umbraco installation process will kick off, adding the tables to the database and updating the web.config as well.
I am getting this error at frequent but seemingly random times in my local copy of my Umbraco Cloud environment running from Visual Studio. It's a big time-waster, as I usually have to restart the application at least a couple times to get the error to clear. I think it has something to do with Visual Studio or some other program not properly letting go of its lock on the MDF database file.
Does anyone have any suggestions to avoid running into this error, so I don't have to keep restarting Umbraco constantly?
Hi
For most people getting this error which i just got for one of my client sites.
Are you using SSL?
Is your web config umbracoUseSSL set to true or false? -
have you tried to Recycle Application Pool for your server?
i recently got this error but that was because i enabled umbracoUseSSL, which seemed to have caused a problem.
My site uses SSL encryption but i cant seem to login to the umbraco backend i keep getting login failed for user. when i enabled the umbracoUseSSL it crashed.
anyone having similar problem with the encryption.
Ok, another scenario... if you copy a SQL Database from one instance of SQL Server to another, you should delete the user that you have set up as dbo for the database, and recreate it.
After digging through the Umbraco source code, I found that more detailed database connection error information than what we see on the YSOD is being logged. This logging is taking place in Umbraco.Core\Persistence\DbConnectionExtensions.cs.
When the IsAvailable database check fails during boot, it outputs this error message:
"Configured database is reporting as not being available."
...along with the full DBException message. This log message is printed to the Output window only, and does not make its way to the regular Umbraco log.
So, next time anyone hits a "A connection string is configured but the Umbraco cannot connect to the database." error when running the site locally in Debug mode, check the Output panel for details.
Hola, este error me sucedió usando una base de datos que proporciona SQL Server Compact para la instalacion de Umbraco 8.5.3. La solución que apliqué fue añadir permisos a los usuarios (clic derecho, seguridad, añadir permisos), sobre el archivo de base de datos Umbraco.sdf que se encuentra en la carpeta app-data. Ya posteriormente, el mismo procedimiento de dar permisos a los archivos que te vaya indicando. Y finalmente, permisos sobre la carpeta que contiene el proyecto de umbraco
Umbraco cannot start. A connection string is configured but the Umbraco cannot connect to the database.
Receiving this error - worked fine previously.
Note: sql ce
Thanks
Is your database / database server online ?
Are you using the correct credentials ?
Has the password for the credentials you are using been changed ?
Cheers
James
Hi James, it's a sql server CE database, stored locally in the project
When trying to preview the database, an error is thrown: The database file may be corrupted. Run the repair utility to check the database file
thanks
I had an almost identical error on 3 of my sites. (all running version 7.2)
All hosted on subdomains on the same server, using SQL CE.
But the strangest part is they all happened at different times (2 were hours apart and the 3rd was a day later)
And the first 2 corrected themselves after a day without anything being changed but the 3rd is still showing this error currently.
Also, an identical copy of one of the sites is being hosted in another place and is perfectly fine. Very confusing..
Has anyone been able to resolve this issue?
I am also getting this using MS Sql Server 2008, Umbraco version 7.2.8 assembly: 1.0.5675.23466.
Thanks, Ally
Hi Ally, in my case the database was corrupted. I had to restore a previous version. Maybe worth a try?
Is your SQL server set up for Mixed Mode? What about your connection string is it properly formed? Just double check the punctuation is correct.
I keep seeing this as well and only over the last few days. Pretty annoying and on a mature project running on sql server 2014.
I had this issue, it was down to not setting up IP on azure. Hope this helps.
Set up Windows Azure firewall rules for this IP address
If you are using sql ce, then double check that permission is set right for app pool to your App_Data directory.
I have the same issue and tried all the above suggestion solutions including checking the web config connection string, database restore to last backup etc. but still no luck
The site is setup in Umbraco 7.2 and using SQL Express.
It was working fine until yesterday, suddenly started to throw the error "A connection string is configured but umbraco cannot connect to the database"
Please help
Hi, I've had this on 2 different sites running 7.2 and SQL Express, in the last week.
If the code is in version control, try checking out a totally new copy of the site/code and running that version.
I think it's some corrupt file(s) somewhere, but I've been unable to pin it down. In my case, a new SVN checkout was all I needed to do.
Oddly though, the copy of the site that wasn't working previously (giving the can't connect error), is now working again, with no changes at all.
I'm fairly sure this is a bug, but at the moment have very little to go on, in order that it can be reported.
Thanks
Adam
Hi guys, I had the same problem, a colleague told me that I needed check the Services and looking for SQL Server (SQL Express) and start it.
Try it.
Good luck.
Not only I have the same issue. This issue only appears to me when I set up the site in IIS. When I use VisualStudio IIS Express there's not a problem.
But when I removed "Integrated Security=true" and used a database account to login it fixed the problem. So it could be the security setting on your database too.
Just encountered this issue, it was caused by the DB login having password expiration enabled (the password had expired).
You have just saved my sanity! Thanks! :)
Hey Anthony Where do you find the password expiration enbaled ?
I'm having the exact same issue in Umbraco 7.3.3
The error is intermittent, and happens at different times, but seems now to be happening all the time on my site. Literally nothing changed between it working and suddenly not working. It still works perfectly on my localhost version, only on the hosted version of the site which is an exact replica.
If anyone has any fix for this, please share! I am completely stuck on this one.
~Thanks.
This one worked for us
This one also worked for us. We connect to the database with integrated security. In the app pool > advanced settings we've also had to enter the windows account data under 'Identity' to get it to work.
Hi
Umbraco 7.3.7
Microsoft SQL Server Express (64-bit)
I had the exact same problem.
I deleted my local website in iis and recreated it with the same data as usually.
Then it worked :-)
/René
In 2008 R2 Security permission on the user for mssql needed to be set properly or got same error when going dev -> live server
User Mapping db_owner and public checked and it was fixed 8)
I got this error when running on Azure.
The problem turned out to be the user specified in the connection string did not have the propper roles on the azure database
If you are using MSSQL add login for IIS APPPOOL\yourapppoolname and add it to sysadmin role
If it's not permissions, and if the database is an SQL Server CE file, you can also get this error if it is being locked by another user / process. Visual Studio may have it's hands on the file, especially if you are running the site through VS, so close that and see how you get on.
Hi guys i have downloaded 7.5.6 using nuget. Iam targeting 4.6.1 framework and its an MVC application. when i run the soluton its not showing install screen.
I hve created new db in SQL 2014 and then create connection string for this database in UmbracoDSN setting in web config.
For using SQL database, you need to create blank database from SQL and than use its name and other SQL credentials at new setup window.
Hi Rakesh,
Ritesh is correct - first create a blank database and assign it a user with dbo permissions.
However, don't edit the web.config as this will be done when you first run the site. It will prompt you and ask which database you are going to use, and when you select "Custom" and put in the details of the SQL Server database, along with your username and password, the Umbraco installation process will kick off, adding the tables to the database and updating the web.config as well.
I am getting this error at frequent but seemingly random times in my local copy of my Umbraco Cloud environment running from Visual Studio. It's a big time-waster, as I usually have to restart the application at least a couple times to get the error to clear. I think it has something to do with Visual Studio or some other program not properly letting go of its lock on the MDF database file.
Does anyone have any suggestions to avoid running into this error, so I don't have to keep restarting Umbraco constantly?
Thanks,
David
This is crazy insane. Why are we not getting the actual error that prevents the connection from succeeding? I'm looking ignorant here.
Hi For most people getting this error which i just got for one of my client sites.
Are you using SSL?
Is your web config umbracoUseSSL set to true or false? -
have you tried to Recycle Application Pool for your server?
i recently got this error but that was because i enabled umbracoUseSSL, which seemed to have caused a problem.
My site uses SSL encryption but i cant seem to login to the umbraco backend i keep getting login failed for user. when i enabled the umbracoUseSSL it crashed.
anyone having similar problem with the encryption.
In my case I didn't find IUSR and IIS_USRS exist on folder inetpub/wwwroot after adding them the site works.
Site's error:
Had this recently.
I was running a project in VS and trying to run another in WebMatrix
Fixed by closing VS and restarting the site n WebMatrix
I resolved this by going into Azure Server > Firewall Settings and turning on "Allow Acces to Azure Services" toggle switch above the IP Addresses
(Seems obvious now doh)
Hello :)
Sometimes when this happens you need to reset the password for the login to the database
Databases --> Security --> you login --> right click -- Properties and then try to change password.
This helped me a couple of times when i had the same problem.
Kind Regards/ Emil
Ok, another scenario... if you copy a SQL Database from one instance of SQL Server to another, you should delete the user that you have set up as dbo for the database, and recreate it.
Thanks
Muiris
After digging through the Umbraco source code, I found that more detailed database connection error information than what we see on the YSOD is being logged. This logging is taking place in
Umbraco.Core\Persistence\DbConnectionExtensions.cs
.When the
IsAvailable
database check fails during boot, it outputs this error message:...along with the full DBException message. This log message is printed to the Output window only, and does not make its way to the regular Umbraco log.
So, next time anyone hits a "A connection string is configured but the Umbraco cannot connect to the database." error when running the site locally in Debug mode, check the Output panel for details.
Hola, este error me sucedió usando una base de datos que proporciona SQL Server Compact para la instalacion de Umbraco 8.5.3. La solución que apliqué fue añadir permisos a los usuarios (clic derecho, seguridad, añadir permisos), sobre el archivo de base de datos Umbraco.sdf que se encuentra en la carpeta app-data. Ya posteriormente, el mismo procedimiento de dar permisos a los archivos que te vaya indicando. Y finalmente, permisos sobre la carpeta que contiene el proyecto de umbraco
If you are on a domain, you need to turn off your firewall.
Had to set SQL Server and Windows Authentication Mode!
8)
I had this problem yesterday, please see this StackOverflow answer to check how I fixed it.
https://stackoverflow.com/questions/34847901/umbraco-cannot-start-a-connection-string-is-configured-but-the-umbraco-cannot-c/73332023#73332023
is working on a reply...