configuration-files

How to manage configuration of components loaded via dependancy injection?

Hi, I am building a application which will use DI Framework to load components to fetch data, from various sources like external web service or DB. Now components will need some of application configuration like web service url or database connection string. Keeping all that stuff in Web.Config and passing it via constructor parameters i...

Installing a configuration profile on iPhone - programmatically

Hi all, I would like to ship a configuration profile with my iPhone application, and install it if needed. Mind you, we're talking about a configuration profile, not a provisioning profile. First off, such a task is possible. If you place a config profile on a Web page and click on it from Safari, it will get installed. If you e-mail...

python single configuration file

I am developing a project that requires a single configuration file whose data is used by multiple modules. My question is: what is the common approach to that? should i read the configuration file from each of my modules (files) or is there any other way to do it? I was thinking to have a module named config.py that reads the configura...

Windows Equivalent of System Configuration Directory

I am developing a CLI application in Ruby, and I'd like to allow configuration in Unix via the standard config file cascade of /etc/appnamerc, ~/.appnamerc. However, the application is also meant to be run in a Windows environment, and I'm unsure of where one would put a file like /etc/appnamerc (C:\windows\system32\etc\drivers does not ...

IIS7: Possible causes of 'Unrecognized configuration path' error

After setting up an ASP.NET website in IIS7 I get an Internal Server Error (500.19) that says: 'Unrecognized configuration path'. What are possible causes of this error? (Setting up other ASP.NET websites works OK, but for a particular website it does not work and I cannot figure out the difference.) Detailed error description: ...

Separating configuration data and script logic in Perl scripts

I find the following anti-pattern repeated in my Perl scripts: the script contains some machine/setup specific settings which I store in-line as constants in the script whereas the rest of the script is general in nature: #!/usr/bin/perl use strict; use warnings; # machine specific settings at the start of the script. my $SETTING_1 = ...

Program configuration data in Unix/Linux

What is recommended way to keep a user configuration data in Unix/Linux? My programming language is C++. Configuration data will be kept in XML/text/binary format, I have no problem with handling such files. I want to know where can I keep them. For example, in the Windows OS configuration data may be kept in the Registry (old way) or in...

How to load a separate Application Settings file dynamically and merge with current settings?

There are questions pertaining to reading settings from a separate config file and others similar to it, but my question is specific to application property settings (i.e. <MyApplication.Properties.Settings> - see XML file below) and how to load them dynamically. I tried the method in this post, which involved refreshing the entire appSe...

Visual Studio Config File Editor - Not Formatting

Hi All, My VS 2008 seems to be acting a bit weird and the solution is eluding me. The problem is that if I open a config file; app.config or web.config, this looks and behaves as a plain text document. I have no formatting, no coloring, no intellisense and no collapsible or expandable regions. I have reset all setting and restored de...

C# COM Component Fails To Read Config When Loaded Into An Unmanaged C++ App

I have a COM component written in C# that makes calls to ConfigurationManager.AppSettings.Get(...). This component is instantiated inside an unmanaged C++ application. Every time, ConfigurationManager.AppSettings is unable to read the configuration file. There might be two problems. 1) What should the app.config be called when the app...

is struts controller creats the action objectes when reading struts-config.xml file?

what does it means "struts controller reads the struts-config.xml file" when ever web application is started? is controller create action objects while reading the struts-config file? ...

XMLPoke a referenced assembly's appconfig value?

I have an assembly built that uses appSettings in the app.config...pretty straight forward. however, I'm referencing this assembly in a web service, and that web service contains the nAnt build file for this service plus being the entry point for everything. Ideally I'd like to be able to set the assembly's appConfig values from the bu...

Zend Framework: Autoloading module resources in config.ini?

Is it possible, to configure the following behaviour in application.ini? <?php class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { protected function _initAdminModuleAutoloader() { $this->_resourceLoader = new Zend_Application_Module_Autoloader(array( 'namespace' => 'Admin', 'basePath' => APPLI...

WiX overwrites config files during setup. How can I avoid this?

Hi, I'm using WiX to create a windows installer. Unfortunately my installer overwrites a config file on every update. What I really want is, that the installer only creates the file if it is not found. Thanks and regards, forki ...

modify config file using bash script

I'm writing a bash script to modify a config file which contains a bunch of key, value pairs. How can i read the key and find the value and possibly modify it? ...

Reloading .NET config file

I need to reload the configuration file after modifying it. How this can be done using appdomains? A code sample would be useful. Thanks. ...

API for parse/update UNIX configuration files

Unix configuration files come in all shapes and forms. I know that Webmin has a Perl API that makes it easy to parse and modify most common configuration programmatically, while preserving changes that might have been made by hand. Are there any other libraries that has similar functionality, perhaps for other languages (Python, Ruby, C...

Loading and storing encryption keys from a config source

I am writing an application which has an authenticity mechanism, using HMAC-sha1, plus a CBC-blowfish pass over the data for good measure. This requires 2 keys and one ivec. I have looked at Crypto++ but the documentation is very poor (for example the HMAC documentation). So I am going oldschool and use Openssl. Whats the best way to g...

Again, user config files C#

Hey guys. I have a large config file (user) that i needed to go to the right location and have some default values. Since i have a installer class, i added some parameter setting to the config file in it, but created the config files in the installers folder. What is the best way to ensure these default parameters will be written only...

C# Getting a string from one config file to be used by multiple projects

Hi everybody. In my project I have a Windows Service and a WCF Service doing some actions on the same folder on a computer. The location of that folder will be given by the user within an app.config file that is included in the Windows Service project. Now, I want the WCF Service to know the location of that folder (the folder given by...