The message says that the umbraco is not able to connect to the database if its SQLCE check that the site has the right permissions to access /app_Data folder
If I remove the unattended install, the connectionstring and the ConfigurationStatus and runs through the stanard Umbraco installer, the Umbraco.sdf database file in the /App_Data folder is created successfull, so permissions should be right.
When I start the application with the unattended install the database file is not created and then I get the above exception (which is correct since the database, don't exists).
So my problem is why the database file is not created? Will the unattended install only create the database tables and not the database it self?
Would be cool to have some code that checks if the provider name is System.Data.SqlServerCe.4.0 and if ~/App_Data/Umbraco.sdf doesn't exist that it creates the database.
I got it working with the empty sql ce database :-)
I might try to do a PR for this since it will be easier to work with. But it will also make the behaviour different for SQL CE and SQL Server if the database will be created for CE but not for SQL Server.
Yeah we'd love to be able to create regular SQL databases as well but that would need an extra set of credentials. It's also a bit more complicated as you would probably want new credentials for each new database, which means you'll need to give the installer admin credentials to create a new user AND a database.. Gets complicated quite quickly.
Obviously we use this for Cloud where we provision databases separately beforehand so we have a pool of connectionstrings to choose from.
Ps. Just a reminder to not use SQLCE in production.. 🙈
Unattended install not working on SQL CE
Hi,
We are using the unattended install feature on SQL server and it works fine.
On some local environments we are using SQL CE and here it seems that the unattended install is not working.
We are just getting the following exception, as if the unattended install was not enabled.
Hi Jesper
The message says that the umbraco is not able to connect to the database if its SQLCE check that the site has the right permissions to access /app_Data folder
Thanks, Alex
Hi Alex, thanks for the reply.
If I remove the unattended install, the connectionstring and the ConfigurationStatus and runs through the stanard Umbraco installer, the Umbraco.sdf database file in the /App_Data folder is created successfull, so permissions should be right.
When I start the application with the unattended install the database file is not created and then I get the above exception (which is correct since the database, don't exists).
So my problem is why the database file is not created? Will the unattended install only create the database tables and not the database it self?
Like with SQL Server, you'd need to provide a blank database to start with in the
App_Data
folder. You can download one here: https://github.com/nul800sebastiaan/LeChiffre/files/7070850/UmbracoEmptySqlCEDatabase.zipThough I would love to see a PR to fix this. Currently the behavior is to connect to the database, check if it has a schema, if not, then we can do an unattended install. This is where the code checks if it can connect: https://github.com/umbraco/Umbraco-CMS/pull/9482/files#diff-2f9348c423cf2afa192ef51f51832a4afec4f0303c8cf3a759f2b5c45cad825aR259
Would be cool to have some code that checks if the provider name is
System.Data.SqlServerCe.4.0
and if~/App_Data/Umbraco.sdf
doesn't exist that it creates the database.Hi Sebastian, thanks for the reply.
I got it working with the empty sql ce database :-)
I might try to do a PR for this since it will be easier to work with. But it will also make the behaviour different for SQL CE and SQL Server if the database will be created for CE but not for SQL Server.
Yeah we'd love to be able to create regular SQL databases as well but that would need an extra set of credentials. It's also a bit more complicated as you would probably want new credentials for each new database, which means you'll need to give the installer admin credentials to create a new user AND a database.. Gets complicated quite quickly.
Obviously we use this for Cloud where we provision databases separately beforehand so we have a pool of connectionstrings to choose from.
Ps. Just a reminder to not use SQLCE in production.. 🙈
It will surely be more complicated with SQL Server yes.
And yes, we only use SQL CE on our local environments :-)
I created a PR to auto create the SQL CE database (https://github.com/umbraco/Umbraco-CMS/pull/10995) and another PR with a new setting indicating if the
unattended.user.json
file should be deleted or not during the unattended install (https://github.com/umbraco/Umbraco-CMS/pull/10996)is working on a reply...