Setting SQL Server using machine.config

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

Hi,

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.

Thanks,

Mathieu

Coordinator
Oct 5, 2011 at 11: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 11: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.

 

Coordinator
Oct 5, 2011 at 11: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 11:51 PM

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

Coordinator
Oct 5, 2011 at 11:57 PM

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

Oct 6, 2011 at 12:00 AM

Ok, thanks for your help