Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Different settings in web.config, based on host

Reply
Thread Tools

Different settings in web.config, based on host

 
 
Daves
Guest
Posts: n/a
 
      06-08-2005
since I have some settings different on my local host (where I develop) and
my ISP's (where I upload my final developments) I need different settings in
my web.config. For example the dbase connection strings are different and
then I want to have debug=true locally but not on ISP host.

How would you solve this, can I programmatically set which web.config file
to use eg. in global.aspx depending on server name?


 
Reply With Quote
 
 
 
 
Phillip Ian
Guest
Posts: n/a
 
      06-08-2005
I simply don't copy the web.config file when I deploy. Of course, if I
make changes that need to be in both, I have to make them twice. But
really, how often do you change the web.config anyway?

Of course, if you're using a deploy project, I'm not sure if that's
possible.

 
Reply With Quote
 
 
 
 
Daves
Guest
Posts: n/a
 
      06-08-2005
probably you're right; do-not-copy, just thought maybe there was some pro
way of doing this. BTW, what exactly is a "deploy-project" ?



"Phillip Ian" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
>I simply don't copy the web.config file when I deploy. Of course, if I
> make changes that need to be in both, I have to make them twice. But
> really, how often do you change the web.config anyway?
>
> Of course, if you're using a deploy project, I'm not sure if that's
> possible.
>



 
Reply With Quote
 
Phillip Ian
Guest
Posts: n/a
 
      06-08-2005
I'm not ruling out some fancy way of doing it mind you...I've never
claimed to be a pro.

I was referring to the Setup Project type in VS. Packages up your
program or site for deployment. I've never used them for web
apps...only Windows.

 
Reply With Quote
 
KMA
Guest
Posts: n/a
 
      06-09-2005
There is a way to add an "include" to the web.config.

The included file contains all the information that is site specific
information. That way you can still copy the web.config. The downside is
that if you change the site specific stuff you have to propagate a reload of
your app otherwise it won't be picked up, whereas simply saving web.config
would make changes immediately.

"Phillip Ian" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> I'm not ruling out some fancy way of doing it mind you...I've never
> claimed to be a pro.
>
> I was referring to the Setup Project type in VS. Packages up your
> program or site for deployment. I've never used them for web
> apps...only Windows.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Settings.settings file with settings for multiple regions donet programmer ASP .Net 3 11-20-2009 03:05 PM
Cisco PIX 501 - Port forwarded to an internal host via Static NAT doesn't work from internal host JoelSeph Cisco 9 01-23-2006 03:52 PM
PIX: how to allow 1 host from outside interface to access another host on the inside interface? jonnah Cisco 1 04-21-2004 02:26 PM
same code produces different decimal symbol on different computers with same settings ASP General 2 12-29-2003 02:29 PM
request.getHeader("Host") returns wrong host name Orpheus66 Java 0 07-30-2003 02:59 PM



Advertisments