468,285 Members | 1,598 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,285 developers. It's quick & easy.

Changing Config Parameters

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
4 1013
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
or store the settings in the database

Jan 20 '06 #3
assuming he is using a database ;)

or store the settings in the database

Jan 20 '06 #4
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.

Similar topics

2 posts views Thread by Winston WOLFF | last post: by
4 posts views Thread by John Bailo | last post: by
4 posts views Thread by tshad | last post: by
5 posts views Thread by TMN | last post: by
reply views Thread by NPC403 | last post: by
2 posts views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.