Prev: FileUpload control - page refresh on submit
From: dw on 24 Feb 2010 18:35
On Fri, 27 Nov 2009 15:39:14 +0000, Nick Gilbert
>> Can you people answer my third question..
>> <add key="" value=""/>
>> How many of the above "add" elements i can store in the web.config?
>No limit, but if you're thinking of putting more than about 20 things in
>here, then you're probably using it for the wrong purpose! This is only
>for storing configuration information. Don't try and store actual data
>in the web.config file - you should use a proper database for that.
>None of my sites have more than 10-12 things in them. Mainly it's for
>configuring things which are different on each server - like email
>addresses for sending notifications to, or paths to folders on the hard
>disk for that particular version of the site.
>Every time you change web.config, the application has to be restarted
>and any users on the site will be logged out unless you're using the
>session state server. So don't put anything here which changes often.
>You shouldn't need to edit web.config unless you've made some major
>changes to the site. Anything else belongs in a database.
If you have a large number of AppSettings items, you could create a
second file (name it myAppSettings or whatever), listing all your
appsettings there, and in your web.config file, just refer to that
This way, also, if you make an addition to the myappsetings file, it
won't restart the entire application.