Where X is a sql server that only I can access (local environment) and Y is the live string. My guess is that the process doesn't return a result so this won't work.
Is this possible; or what's the "right" way to do this so I don't have to modify my web.config as I move my data to and fro?
Alternatively, you could hook into the Application_Start() and set the value there perhaphs (based on host)? Haven't tried it, so I'm not sure if that'll even work.
What I do is not release the web.config with the rest of my files - especially once the site has gone live. At this stage I make any changes manually to the web.config.
Conditional sql server selection in web.config?
I would love if I could do something like:
If
<add key=umbracoDbDSN" value=serverXcnxstring />
else
<add key=umbracoDbDSN" value=serverYcnxstring />
Hi Kyle,
Might have a look at this article from the guys at the farm digital, especially on how they handle such situtations.
Cheers,
/Dirk
Alternatively, you could hook into the Application_Start() and set the value there perhaphs (based on host)? Haven't tried it, so I'm not sure if that'll even work.
Thanks guys -- I'll just do the lazy thing and shift the commenting as I move the web.config back and forth.
What I do is not release the web.config with the rest of my files - especially once the site has gone live. At this stage I make any changes manually to the web.config.
is working on a reply...