By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,028 Members | 1,869 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,028 IT Pros & Developers. It's quick & easy.

divide appSettings between web.config and a section in external file

P: n/a
Hi.
Is is possible to divide appSetting in two, having some values stored
in web.config itself and some in a section referenced in appSettings
file="...." attribute?

Mar 29 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Yes. Create a user.config file.

in your web.config you want...

<appSettings file="user.config">

in your user.config, you want...
<?xml version="1.0" encoding="utf-8" ?>

<appSettings>

</appSettings>

You will then stick your keys inbetween the appsettings. Note, any keys in
user.config will override any keys of the same name in the web.config.

The idea being that you have a standard web.config that is the same as your
live web.config (including your database settings) and your local
user.config overrides those DB settings. What's more, you don't even have to
have a user.config on your server even if your web.config looks for it.

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Sergei Shelukhin" <re******@gmail.comwrote in message
news:11**********************@r56g2000hsd.googlegr oups.com...
Hi.
Is is possible to divide appSetting in two, having some values stored
in web.config itself and some in a section referenced in appSettings
file="...." attribute?

Mar 29 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.