Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

example for reading from cacheConfiguration

Status
Not open for further replies.

jrenae

Programmer
Jan 18, 2006
142
0
0
US
Hello,

I'm trying to pull out the 'expirationPollFrequencyInSeconds' from the CacheManagers section of my config file. It seems like it should be easy, but I'm having a very hard time with it. Can anyone please give me a good example?

Thanks for any help
 
Thank you but it looks like those links are talking about the cacheManager, which I would use to get information from the cache. I'm just trying to pull out a value from the config file.
 
in the appSettings section?

If you are using .net 2.0 look at the System.Configuration.ConfigurationManager class. In 1.1 it was System.Configuration.ConfigurationSettings class.

 
I wish it was in the appSettings, since that would be easy. But it's in it's own section called cacheConfigurations. So I'm getting that section via the ConfigurationManager.GetSection method. But how to pull out the values after that is escaping me.

Code:
ConfigurationSection cacheConfigSec = System.Configuration.ConfigurationManager.GetSection("cachingConfiguration") as ConfigurationSection;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top