ConfigurationSettings becomes ConfigurationManager

In v1.1 we used the ConfigurationSettings class to read values from our configuration files (web/app.config), in .NET 2.0 we now have the ConfigurationManager class.

ConfigurationSettings.AppSettings[”MySetting”];

becomes

ConfigurationManager.AppSettings[”MySetting”];

 

# re: ConfigurationSettings becomes ConfigurationManager

Sunday, April 17, 2005 1:58 PM by Lakshmi narayanan.R    
Its look interesting!!

Using this how could we get the key values existing in the root folders "web.config" file , from the subdirectory pages.

What are the benefits in this new!!



# re: ConfigurationSettings becomes ConfigurationManager

Sunday, April 17, 2005 10:50 PM by Steve    
I'm still figuring a lot of that out :-) I'll post back when I get more info.

# re: ConfigurationSettings becomes ConfigurationManager

Tuesday, April 19, 2005 12:56 AM by Blair    
The biggest difference is that your config file is now read / writeable. So you can now use the configuration system just like the old VB6 PropertyBag and do things like this:

Configuration.AppSettings["MySetting"] = "mysetting";

And get it written to the file; great stuff right.

# re: ConfigurationSettings becomes ConfigurationManager

Tuesday, April 19, 2005 1:15 AM by Steve    
Schweet! ;-)

# re: ConfigurationSettings becomes ConfigurationManager

Wednesday, April 20, 2005 4:49 AM by Wayne Smith    
So how does this play with the ConfigurationManager included in the EnterpriseLibrary?

# re: ConfigurationSettings becomes ConfigurationManager

Sunday, April 24, 2005 10:23 PM by Daniel Moth    
Also note that you need to add a reference to System.Configuration (whereas before just System was fine, for non-web projects)

# re: ConfigurationSettings becomes ConfigurationManager

Sunday, April 24, 2005 10:54 PM by Steve    
Good point Daniel, It took me a couple minutes to realize that it was necessary. I checked my spelling a couple times before opening up the References for my project.

# re: ConfigurationSettings becomes ConfigurationManager

Wednesday, April 27, 2005 5:45 PM by Marc    
Hi

I defined a setting via the properties editor in VS2005B2. Now when I call

MyRootNameSpace.Properties.Settings.Default.myAppSetting

then I get the correct value. However, if i try

ConfigurationManager.AppConfig["myAppSetting"]

my setting's value won't be returned. I saw other posts on the web describing the same problem, but found no answer yet. maybe someone here can help?

# re: Encytemedia redesigns ActiveType (CMS)

Thursday, June 30, 2005 4:15 PM by Joshua Marshall    
Definitely, definitely interested...

It's looking great already - can't wait to see what else you have in store for it.

email: sayhello [at] partiallyblind.com

Thanks!

# re: ConfigurationSettings becomes ConfigurationManager

Monday, April 30, 2007 11:14 AM by sfh4hfs    

Post a Comment

 
 
Prove you're not a spammer: 
7 + 6 =