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

Changing Config Parameters

P: n/a
I noticed that ASP.Net caches the web.config and does not reread it unless
it is changed. But if you change it, it restarts the app and even session
variables are cleared (Am I correct ?).
I used another config file by using the file="debugparms.config" in the
appsettings section. If I change this file, ASP.Net does not restart the app
but it also does not read the file again unless I change web.config.

My purpose is to turn ON/OFF some logging as needed. To do this without
having to restart the app, I am planning on putting these variables in the
cache object and changing them as needed using a special page. Is this the
right approach ?

Thanks
Jan 20 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hello Srini,

I am afraid this is not the right way to do it. You might be better off using
application variables.

HTH,
r.

I noticed that ASP.Net caches the web.config and does not reread it
unless
it is changed. But if you change it, it restarts the app and even
session
variables are cleared (Am I correct ?).
I used another config file by using the file="debugparms.config" in
the
appsettings section. If I change this file, ASP.Net does not restart
the app
but it also does not read the file again unless I change web.config.
My purpose is to turn ON/OFF some logging as needed. To do this
without having to restart the app, I am planning on putting these
variables in the cache object and changing them as needed using a
special page. Is this the right approach ?

Thanks

Jan 20 '06 #2

P: n/a
or store the settings in the database

Jan 20 '06 #3

P: n/a
assuming he is using a database ;)

or store the settings in the database

Jan 20 '06 #4

P: n/a
I am using a database but why hit the database every time a page is hit ?
Wouldn't it be just more efficient if I cached the settings and be able to
change them through a web page(password controlled and all that stuff) ?
This would allow me to log certain data at certain times of the day for
analysis without affecting any current conected sessions. Some pages are hit
very frequently by different automated clients.

Thanks for all the feedback

<tf******@excite.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
or store the settings in the database

Jan 20 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.