Multiple configurations

J

Jerry III

I was just wondering, is there a way to have different configurations for
different servers in one web.config file? For example, the development
server would have custom errors turned off while production would have them
on. And I would like to keep it in one file, since the web.config is in
source control and I'd like to keep one file for both development and
production (instead of having two versions, in two projects and trying to
keep them synchronized, except for the parts I want to be different).
Something like this:

<customErrors mode="off" machine="Development" />
<customErrors mode="on" machine="Production" />

where the machine attribute would specify the machine name for which the
setting is intended. Is there a way to do this?

Jerry
 

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

Forum statistics

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

Latest Threads

Top