I've got some question about two ways to save settings in the web.config.
Appsettings:
Look in web.config
<appSettings>
<add key="key1" value="value1"/>
<add key="key2" value="value2"/>
</appSettings>
Usage in code-behind:
ConfigurationManager.AppSettings["key1"];
ApplicationSettings/ Properties (autogenerated by using the 'prop...
Hi,
I'd like to have a settings bundle behavior similar to the iPhone WiFi settings.
If you select the toggle switch and set it to on, an optional group with the specific settings appears. How is this done? I haven't found any clue by now.
...
By default settings are stored at: C:\Documents and Settings\\Local Settings\Application Data\<Project Name>
How can I change this path to application directory. I also don't want to have different files for different users. How make the settings global?
I tried to change the scope of the settings to "application" but then I cannot c...
I've searched the site and haven't found exactly what I'm looking for. Close, but no cigar.
Basically I want to have a config section like this:
<configSections>
<section name="PhoneNotificationsSection" type="Alerts.PhoneAlertConfigSection,Alerts,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null"/>
</configSectio...
I'd like to know if there is an automated method to add e-mail settings to web.config.
There is already an e-mail set, and it's currently like this:
<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network host="0.0.0.0" port="25" userName="[email protected]" password="stackoverflow" />
...
I am doing a movieplayer application and I want to activate certain settings about my application in settings.
What are the steps should I do to get an entry for my app in the settings of iphone/itouch?
...
My service is a DLL and it can be installed multiple times. The DLL has its settings stored in Settings.settings. Each instance of the DLL will have its own Settings.settings. Can this be done with Settings.settings, or do I have to create my own configuration scheme? I want to avoid reinventing the wheel if possible. I don't have to ...
Perhaps this question has been asked before in a different way, but I haven’t been able to find it.
I have one or more plugin adapter assemblies in my application all having the type IPlugin, for instance. Each adapter has its own settings structures stored in a common directory. Whether they are stored in one contiguous file or in s...
I have a .settings file (containing both User and Application settings) that I would like to contain different values if built in Debug mode. Is there a supported or recommended way to do this?
...
I was thinking either:
Appconfig File
A generic .XML file and have the program load values at launch.
What is the best way to do this? A website with a best user tutorial perhaps?
...
Here's what I'm doing.
I have three properties: MomsBackground, DadsBackground and ChosenBackground.
When Momsbackground is selected in the program, I set the ChosenBackground string according to what item the user has clicked (either "Mom" or "Dad").
Then on Form_Load() I use a switch case for the ChosenBackground string and accordin...
Hi,
When I use this to write to my app.config file:
Configuration config =ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings["Wachtwoord"].Value = "Test";
config.Save();
ConfigurationManager.RefreshSection("appSettings");
I can read it again. But when i close and restart the program, t...
I am thinking about adding configurable settings to an application, and I think the easiest ways are an external file or win registry (its a win only app).
Which way would be better?
I was wondering, an user with not enough permissions may not be able to create/write the config file. And in the case of the registry, would todays antivi...
Hello,
I'm trying to access my app.config file which has nested element and I'm unable to do so.
I will appreciate any help...
<configSections>
<section name="settings" type="test1.CustomSettingsConfigSection, test1" />
</configSections>
<settings>
<types>
<type name="type1">
<add name="testName1" value="testVa...
Are there any recommendations on when to use Application settings (not per user settings) vs. .config file <appsettings>?
Update
Looking to understand some of the finer and important differences because they're both effectively key/value stores.
For example, I know modifying appsettings in web.config will recycle the web application.
...
Is anyone aware of a way that I can set application (or user) level settings in a .Net application that are conditional on the applications current development mode? IE: Debug/Release
To be more specific, I have a url reference to my webservices held in my application settings. During release mode I would like those settings to point to...
One of the iPhone apps I work on doesn't currently have a Settings.bundle in its project.
I want to add some debug settings in a Settings.bundle for our QA department, so they can enter different server URLs used for web services (so they can point at production, staging, dev, etc.).
For our final App Store build, I don't want there to...
I am using msdeploy to transfer my changes(via a nant script in Team City) that I make to a site and it is great!! I have just one question, I am using msdeploy with the sync feature to make my life easier.
I currently exclude the web.config in my msdeploy because I do not know how to change the web.config on the fly. How do I change ...
Hi, I'm working on a project that consists of ASP pages (not ASP.Net). I would like to know if there are security mechanisms that can be implemented for ASP just like the ones that ASP.Net handles in the webconfigs.
Thanks in advance
...
How do I check to see if an Application Setting is available?
i.e. app.config ==>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key ="someKey" value="someValue"/>
</appSettings>
</configuration>
[code]
if (ConfigurationManager.AppSettings.ContainsKey("someKey"))
{
// Do Something
}else{
// ...