I have a Umbraco website built on my local dev machine, everything is 100% the site boots up properly and I'm able to navigate and interact with it, all good and 100%.
So I'm busy loading the site on our server and I've done this multiple times already with 3 different Umbraco sites and everything went smoothly.
But in this instance, 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) in D:\a\1\s\src\Umbraco.Core\RuntimeState.cs:line 188
at Umbraco.Core.Runtime.CoreRuntime.DetermineRuntimeLevel(IUmbracoDatabaseFactory databaseFactory, IProfilingLogger profilingLogger) in D:\a\1\s\src\Umbraco.Core\Runtime\CoreRuntime.cs:line 498
at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer) in D:\a\1\s\src\Umbraco.Core\Runtime\CoreRuntime.cs:line 186
Have you tried to connect to the database with the Sql server management studio?
It´s likely either permission to the user or credintials witchs is not matching, but the Sql server management will tell you :)
with the previous sites that I've done the conn string points to the Umbraco.sdf file in the app_data, but I guess that's not possible in this case since all the Umbraco content is in the DB and there is no .sdf file in the solution.
$conn.ConnectionString = "replace with connection from config"
For the last type in
$conn.Open()
Either it stalls and you get and exception in powershell of the issue, and there is some network issue, that the server can not talk to the Database else is just allow you to type more commands, and evertything is fine.
wow, I never knew that I can do this, this will really help in the future for testing connections thanks.
I did get an exception...
Exception calling "Open" with "0" argument(s): "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not
found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces,
error: 26 - Error Locating Server/Instance Specified)"
At line:1 char:1
+ $conn.Open()
+ ~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : SqlException
It was not the connection string at all.
I had to give the following object full control to the 'App data' folder, IIS_IUSRS\servername. This resolved the issue, the site is up.
I have never manually done this before. It's strange that it was not automatically added I wish I knew why? But it works, hope this helps someone in the future, thanks for all the input
Umbraco could not connect to the database.
Hey devs, I really need help with this.
I have a Umbraco website built on my local dev machine, everything is 100% the site boots up properly and I'm able to navigate and interact with it, all good and 100%.
So I'm busy loading the site on our server and I've done this multiple times already with 3 different Umbraco sites and everything went smoothly.
But in this instance, I get this error
this is my local sting in config file:
and this is the string on the server:
I know that the issue is most likely my conn string but I just don't know why.
Hey Kyle,
Have you tried to connect to the database with the Sql server management studio? It´s likely either permission to the user or credintials witchs is not matching, but the Sql server management will tell you :)
HI there, that's the thing... I can log in perfectly with the details specified in the conn string...
Can you make any SQL statements into a table as
Hey Lucas,
I've just tested it and yes I can run the statement successfully I've really exhausted all my options my mind is baffled :/
with the previous sites that I've done the conn string points to the Umbraco.sdf file in the app_data, but I guess that's not possible in this case since all the Umbraco content is in the DB and there is no .sdf file in the solution.
Okay, we know is not the connectionstring or permission, let´s try something out of the boks.
I hope you have access to the server, because we gonna test the connectionString and connect to the SQL Database thouge PowerShell!
On the server open the newest version of Powershell in administrator mode.
And starter the first line:
For the next line type in
For the last type in
Either it stalls and you get and exception in powershell of the issue, and there is some network issue, that the server can not talk to the Database else is just allow you to type more commands, and evertything is fine.
wow, I never knew that I can do this, this will really help in the future for testing connections thanks.
I did get an exception...
This is the string...
So I know 100% that the user details are working and there are no permission issues, so with that said the only issue can be in the
portion, but what is it?
Is the server the same machine as wesite? If yes, just try .\SQLEXPRESS
Hi there, yes it is on the same machine. I have tried your suggestion but I'm getting a new error...
I have given the Network service full control of the 'App data' folder
Hi, I have found the solution...
It was not the connection string at all. I had to give the following object full control to the 'App data' folder, IIS_IUSRS\servername. This resolved the issue, the site is up.
I have never manually done this before. It's strange that it was not automatically added I wish I knew why? But it works, hope this helps someone in the future, thanks for all the input
is working on a reply...