Setting SQL Server using machine.config

Topics: Installing Orchard
Oct 5, 2011 at 9:38 PM


I am trying to move the connection string to the SQL Server form the settings.txt to the machine.config of my web server.

So far, it has been unsuccessful. Any guidance would be welcome.



Oct 5, 2011 at 10:01 PM

Unsuccessful how? Did you get errors? Not sure what you mean by "moving to the machine.config". Why would you want to do that in the first place?

Oct 5, 2011 at 10:24 PM

Sorry for the lack of details. What I am trying to do is setting up a SQL failover.

In other projects, we achieve this by adding the sql connection string in the machine config of our web server where we also set the failover server.


Oct 5, 2011 at 10:43 PM

That does not look like something that would be easily achieved. The reason for the use of settings.txt files runs pretty deep in the multi-tenancy architecture of Orchard. I'm not saying it's impossible but you will have to dig pretty deep, to which point it would probably be preferrable to just add a new entry in settings and the code to handle it than try to move all that to config.

Oct 5, 2011 at 10:51 PM

So can I set a Failover Partner in my connection string in settings.txt?

Oct 5, 2011 at 10:57 PM

That's not what I said. You'll need to write that feature.

Oct 5, 2011 at 11:00 PM

Ok, thanks for your help