473,396 Members | 2,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 1167
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Winston WOLFF | last post by:
What do people think about changing the parameters to logging.debug() to be more like the parameters to print? As you know, you can pass multiple parameters to print, and they are all printed out...
4
by: John Bailo | last post by:
What's the cost of web.config parameters? Low or high? Is web.config read into memory? Or is there disk access each time a parameter is read ? -- W '04 <:> Open Source
1
by: ABC | last post by:
I want to check the user roles for allow/deny access each pages. I know it is possible to add check code on each page. But is very spent time. Is there any configuration (web config) parameters...
4
by: tshad | last post by:
I need to pass a few parameters to my Windows Service program. The end user will be changing the parameters and settings should be saved. What is the best practice - use app.config - use .ini...
1
by: Lupus | last post by:
Hi folks, I've created a class library, compiled as a .DLL-file to support my ASP.NET webapplication. My .NET-application has some parameters (ie. SQL connection string) stored in the web.config...
5
by: TMN | last post by:
Hi All If I want to use an xml file to hold some config parameters for a web page do I need to load it with JS or is there a way of including it in the <head? Thanks Tim
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.