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

S

Sergei Shelukhin

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?
 
D

David

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
 

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,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top