Changing Config Parameters

S

Srini

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
 
R

Ranjan Sakalley

Hello Srini,

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

HTH,
r.
 
S

Srini

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
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top