config

How to write to the main exe's .config userSettings section?

Is there any supported API in .NET 2.0 for writing to the userSettings section of the main exe's .config file? The scenario is: Winforms 2.0 application. I have a setting (a database connection string, if you need to know) that has user level scope. This means that each user has a user.config file created by .net when the user saves t...

What's the best Perl module for hierarchical and inheritable configuration?

If I have a greenfield project, what is the best practice Perl based configuration module to use? There will be a Catalyst app and some command line scripts. They should share the same configuration. Some features I think I want ... Hierarchical Configurations to cleanly maintain different development and live settings. I'd like t...

At what point does a config file become a programming language?

I have been mulling over config files and their relationship to code for a while now and depending on the day and direction of the wind my opinions seem to change. More and more though I keep coming back to the realization I first had while learning Lisp: there is little difference between data and code. This seems doubly true for conf...

java reference file at same level as jar

Fixed the problem with the following code - not the most gracious way - but i need a quick solution for this assignment package six.desktop.gui.common; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; public class Config { private static final String configFileName =...

Store a collection of values in a config file

In a .Net 3.5 (Windows) service, I would like to store a small collection of values in the config file. Basically, I need to allow admins to add and remove values from this small collection. What do I need to add to the config file to store a collection of small values, and how can I read the collection in C#? To clarify, the collect...

How to store a user-related information in .net apps?

What is the preferred way to store user-level information for .NET application. I could have used registry or config files - but some users don't have enough permissions to save/load from these. I have heard something about assembly private storage or smth like that, is it a way to go? My main concern is to make sure that even users w...

How do I read from a config file in Flex?

Hey, I'm working on a project for school right now and we're trying to get it set up so that it is easily deployable. The webapp portion of it is written entirely in Adobe flex. However, we need links to certain files / url's within the code which are different on different machines. For instance, my server might use 8180 as the port ...

Configuration of Grails plugin

I'm developing my first Grails plugin. It has to access a webservice. The Plugin will obviously need the webservice url. What is the best way to configure this without hardcoding it into the Groovy classes? It would be nice with different config for different environments. ...

What's the best way to store app settings? (MVC)

Hi I'm developing a swing app which suits the MVC pattern and I'm wondering about the best place to store settings such as width/height, xml files location... Should those settings be avaiable also only through the Model? Should I use a global static class? A singleton? Thanks in advance ...

C# Configuration Files

Okay, so a while ahead I posted how to read other config files of other programs (here is the link Previous Post. I managed to do it. But now there is another problem. The scenario is like this, I have two programs. Program A reads its configuration from a config file and program B is only used to modify the contents of the config file w...

Changing grails.serverURL has no effect on createLinkTo( [...], absolute:'true')?

I'm trying to display a Java applet in a page on a Grails server. I'm using Sun's handy Javascript snippet for displaying applets: <script src="http://java.com/js/deployJava.js"&gt;&lt;/script&gt; <script> deployJava.runApplet({codeBase:"${createLinkTo(dir:'applet', absolute:'true')}", archive:"${createLinkTo(dir:'com/steve/applet',...

Parsing an existing config file

I have a config file that is in the following form: protocol sample_thread { { AUTOSTART 0 } { BITMAP thread.gif } { COORDS {0 0} } { DATAFORMAT { { TYPE hl7 } { PREPROCS { { ARGS {{}} } { PROCS sample_proc } } } } } } The real file may not have these exact fields, a...

Settings file of a console app is not being created

I have a solution which has 3 projects. One is a console app and other 2 are windows applications. Both windows applications uses console application so I added the reference of console application in both windows app projects. Now when I build windows projects, console application is being copied in output directory but the problem is t...

How to Load Config File Programmatically

Suppose I have a Custom Config File which corresponds to a Custom-defined ConfigurationSection and Config elements. These config classes are stored in a library. Config File looks like this <?xml version="1.0" encoding="utf-8" ?> <Schoool Name="RT"> <Student></Student> </Schoool> How can I programmatically load and use this confi...

Rails dependencies issue when in production mode

Im working on a legacy oracle database with a slightly odd table naming convention where each column name is prefixed with the tables initial letters - eg policy.poli_id. To make this database easier to work with I have a method set_column_prefix that creates accessors for each column with the prefix removed. ie: # Taken from wiki.ru...

Packaging Perl modules with Config files?

I am currently creating a Perl module for in house use. I used ExtUtils::ModuleMaker to generate a build script and skeleton for my Perl module. I would like to include .ini config files that my core modules need to run properly. Where do I put these files so they are installed with my module? What path do I need to use to access these c...

Microsoft.Web.Administration.ServerManager can't read config sections containing encrypted passwords in applicationHost.config

I have some sites in IIS7 that are configured to run as domain users (MYDOMAIN\someuser). I'm using the Microsoft.Web.Administration namespace to scan my server configuration, but it's throwing an exception when I hit one of these "impersonator" sites: using (ServerManager sm = new ServerManager()) { foreach (Site site in sm.Sites)...

php script Config settings

I have found a little script which looks interesting, you can download the svn from google code at http://code.google.com/p/streetwire/source/browse/ I am trying to set it up on my xampp localhost install, and there is little documentation, here are the first two lines of the config // Paths define('VHOST_DIR', '/data/vhost'); define(...

How to direct the EventLogTraceListener to create in a specific Log

The following listener will create an event entry when the Trace.WriteLine is called. If the source does not exist he will create it in the default log channel which is 'Application' . I want to specify another default Log channel but after searching for 45 minutes i don't seem to find the solution. Any ideas? <configuration> <syst...

SSL Tomcat Configuration

I am using tomcat 5.5 and configured keystore and added this connector inside server.xml file <Connector port="443" minProcessors="5" maxProcessors="75" enableLookups="true" disableUploadTimeout="true" acceptCount="100" debug="0" scheme="https" secure="true"; clientAuth="false" sslProtocol="TLS"/> But I am not sur...