Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

Production vs. development

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gsauns - 13 Sep 2007 20:23 GMT
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?
Cowboy (Gregory A. Beamer) - 13 Sep 2007 20:33 GMT
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.

Signature

Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************

| Think outside the box!

*************************************************
> Hello,
>
[quoted text clipped - 11 lines]
>
> Does anyone have a good way to get around this?
bruce barker - 13 Sep 2007 20:42 GMT
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)

> Hello,
>
[quoted text clipped - 11 lines]
>
> Does anyone have a good way to get around this?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.