configuration-files

Preserve case in ConfigParser?

I've tried to use python's ConfigParser module to save settings. For my app it's important that I preserve the case of each name in my sections. The docs mention that passing str() to ConfigParser.optionxform() would accomplish this, but it doesn't work for me. The names are all lowercase. Am I missing something? <~/.myrc contents> [rul...

Applications for building and driving Configuration Files

Hello: Do you know about cross platform applications that easly build and drive configuration files? I imagine one consisting of a configuration data modeler which then dynamically generates an screen/form to enter configuration data into a flat file or database file and finally, can be embedded to let an easy and fast recovering from ...

Avoid App.config file in project when using with SQLite/SubSonic (or any other database)

I have a project which I am developing with SQLite and SubSonic 3. I want to know that how can I avoid the App.config file altogether. How do I tell my program to use SQLite Data provider. I mean, how can I tell it this: <DbProviderFactories> <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework...

c# simple non-xml config files?

Is there a build-in way in C# to work with simple config files which ate not XML? Or maybe there are popular free libraries? I'm making a simple tool for non-programmers to use, and I don't want to complicate it by adding UI for configuration editing. I just want users (all comfortable enough with computers) to just be able to open conf...

Key-value pairs in configuration file on unix - can the value contain the number sign (#)??

Hi, I'm using the openssl utility of debian in order to create a certificate. The certificate paramemters are given in a configuration file, which is made of key-value pairs. My problem is that I want one of the values to include the number sign (#). But openssl handles this sign as a beginning of comment, i.e. if my value is val#1, o...

What is the suffix called in this example: HelloWorld.exe_Url_sbgzldmathiegtnjmnawytpet03ycanv?

Hello, I have a question about the very long random looking suffix that is appended to directories created in the AppData folder when saving user preferences from a C# .NET Windows forms application. For example: C:\Users\Bob\AppData\Local\Acme\HelloWorld.exe_Url_ei0yyv33jvrgjqybolgkilwx2u1i32lq\ The problem that I'm having is that I...

Reduce number of config files to as few as possible

For most of my applications I use iBatis.Net for database access/modeling and log4Net for logging. In doing this, I need a number of *.config files for each project. For example, for a simple application I need to have the following *.config files: app.config ([AssemblyName].[Extention].config) [AssemblyName].SqlMap.config [Assembly...

Updating AppSettings via ASP.NET MVC Controller

I'm writing a basic little forums web app (for fun and to sharpen the ole' saw), and I'm having a bit of trouble with AppSettings. My plan is to have these settings in their own file (Settings.config), to which I will grant modify permissions to the web process user account, and store all editable settings in this file (e.g. forum title...

Why is a published website referencing my machine?

I have a website that I publish in Visual Studio 2008 and then send off to other people. One of the pages needs to alter a few configuration files, so an action is executed using WindowsImpersonationContext inside a class library referenced by the website. protected void WithImpersonation(ExecuteUnderImpersonation action) { using(Wi...

AppConfig in a VS 2008 test project?

I've just added my first test project to a VS 2008 solution. I have a component I'd like to use in a unit test; the component calls System.Configuration.ConfigurationSettings.GetConfig() to get a setting, and I'd like for that call to work in my test. Any ideas how I can do this? I don't see any app.config in the project, so I'm not s...

Using App.config to set strongly-typed variables

I'm a C# novice running .NET 3.5, and I'd like to store a bunch of application default values in App.config, as the settings may vary by server environment (e.g. development, staging, production). What I want to do is similar to what's described in this StackOverflow article, but I also want to be able to use non-string values (e.g. int...

AppSettings on a different .config file not being updated

I am trying to do the exact same thing mentioned on this recent previous question. In essence, here's the case (which is exactly my same situation): My plan is to have these (appSettings) in their own file (Settings.config), to which I will grant modify permissions to the web process user account, and store all editable se...

String format for Castle DictionaryAdapter

I'm using Castle DictionaryAdapter in order to get the application settings from the app.config as an interface ( based on Getting rid of strings (3): take your app settings to the next level ): public interface ISettings { int MaxUsers { get; } string FeedbackMail { get; } DateTime LastUserLogin { get; } } app.config <?xml ver...

PHP - Application config file stored as - ini,php,sql,cached,php class,JSON,php array?

I am trying to decide on the best way to store my applications configuration settings. There are so many options. The majority of applications I have seen have used a simple require and a PHP file that contains variables. There seem to be far more advanced techniques out there. What have you used? What is most efficient? What is most ...

Embedding app.config - working only in release, debugg does not

Hi, In order to have neater app distribution I have made app.config file to be embedded resource, since it only contains default values. However, the app now cannot be debugged, it throws an exception (ConfigurationErrorException). But when released, the app runs fine. Is there any way how to get it working in the debug time too? Thanks ...

How do I globally configure RSpec to keep the '--color' and '--format specdoc' options turned on

How do I set global configuration for RSpec in Ubuntu. Specifically so, --color and --format specdoc stay turned on, across all my projects (ie every time I run rspec anywhere). ...

Add an XML schema to Visual Studio

I want Intellisense support when writing App.config sections or XML configuration files for components like NHibernate, log4net, or Unity. What options do I have to get Visual Studio to find these files and load Intellisense? (Assume we have the schema file.) ...

Flex External Configuration File..

My problem: I have a program in Flex3 that accesses a server. The program itself is on a server and accessed through a web browser. The point is that I don't want to hardcode in the swf file the IP of the server to access, since it changes and for various other reasons... How can I do that? Can I put a file in the same directory and wha...

How to store custom settings for a WCF service?

People says that libraries shouldn't have configuration files. I can't pass arguments to my WCF service class from its host (but I can from the client). I don't want to store the configuration on the client. What should I do? ...

Grails config files: best practice

Hi, Just wondering what is the 'best practice' when adding config key-value pairs to your grails app. Should you just add to Config.groovy or create new files. I tried creating a new config file (Company.groovy) but could not access the config props from my app. However when I cup-paste the properties into Config.groovy I do have acces...