How does ConfigurationManager.AppSettings.Set stores values?

G

Guest

Hello everybody,
you can use ConfigurationManager.AppSettings.Set method
(ConfigurationManager is in System.Web.Configuration namespace) to store a
modified value from web.config.
To be practical, you define a custom key in web.config:

<appSettings>
<add key="ReportButtonClick" value="0" />
</appSettings>

retrieve value of the key with Get method:

counter = ConfigurationManager.AppSettings.Get("ReportButtonClick")

modify this value:

counter = counter + 1

and write it back with Set method:

ConfigurationManager.AppSettings.Set("ReportButtonClick", counter)

If I access back value with Get method, I find modified value but, of
course, web.config is NOT modified.
Where does Set method stores property's value?
 
G

Guest


Good answer, Terry, but I'm not so comfortable about caching in ASP.NET :)
How do examine cache for my application?
And, is using cache scalable to million of users?

P.S.: a little question: I'd like to download newsgroup in OE. What is NNTP
Server? Does it require authentication? If so, do I have and type my Passport
credentials?
 

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

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top