Production vs. development

G

gsauns

Hello,

I have just put a new virtual server in place that I intend to make my
development server. I would like to develop and test on that new
server, and host my production apps on my production server. I also
have identical databases on each server.

Now, when I first brought up my app by going to the development
server's URL, I got an access denied error on a Connection String in
my app. OK, fine, I can just change it to fit my development server
for now. But going forward, I would have to change several files,
several times to achieve the same result every time I wanted to copy
something from my dev server to my production server.

Does anyone have a good way to get around this?
 
C

Cowboy \(Gregory A. Beamer\)

This will be fast, as I don't have a huge amount of time.


Create a separate file for the connection strings. You link it like so:

<connectionStrings configSource="db.config" />

You can then remove this file from your deployment before you push it out to
production and leave the db.config file for production out there. I will
have to check on connection strigns, but app settings can be set up like so:

<appSettings file="local.config">

<add key="communicationPort" value="1732"/>

</appSettings>

If the local.config file does not exist on your dev server, it will use the
keys from the block. You then set up the local.config out on the server for
the changes and it overrides any values from development.


I would also look up local.config, as it is somehow automagically removed
from deployment. We use that for app settings that change from local to
production.
 
B

bruce barker

look at deployment projects. they support separate files for config
sections. as they build a dir for each deployment, you dev enviroment
can be debug, and production not.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top