We are posting in here due to a situation we are currently facing in an Umbraco Project (version 8) and for which me and my team cannot find a proper solution.
We are trying to connect to our Umbraco Database dynamically, meaning that the installation should connect during the startup time. Although, we could insert the connection string in the web.config file, we intend to do it this way to deliver a solution as secure as possible, not exposing the connection credentials anywhere in the code or configuration files.
We have already tried to use DatabaseFactory on our CustomOwinStartUp file, as well as to create a composer to create a Sql Connection. Both implementations did not work, resulting on Umbraco starting up as an initial configuration and asking to install the framework, even though using DatabaseFactory did create a connection. We have no problem in creating the connection string dynamically, using KeyVault to provide the password for the user specified, but we cannot find a way to make Umbraco connect to this Database, as its principal Database.
Could anyone help by providing us some information to overcome this issue?
Dynamic connection string for DB access
Hi there,
We are posting in here due to a situation we are currently facing in an Umbraco Project (version 8) and for which me and my team cannot find a proper solution.
We are trying to connect to our Umbraco Database dynamically, meaning that the installation should connect during the startup time. Although, we could insert the connection string in the web.config file, we intend to do it this way to deliver a solution as secure as possible, not exposing the connection credentials anywhere in the code or configuration files.
We have already tried to use DatabaseFactory on our CustomOwinStartUp file, as well as to create a composer to create a Sql Connection. Both implementations did not work, resulting on Umbraco starting up as an initial configuration and asking to install the framework, even though using DatabaseFactory did create a connection. We have no problem in creating the connection string dynamically, using KeyVault to provide the password for the user specified, but we cannot find a way to make Umbraco connect to this Database, as its principal Database.
Could anyone help by providing us some information to overcome this issue?
Best regards, João Galveias.
is working on a reply...