configuration

Help with MySQL gem on OSX

I'm trying to get the mysql gem working on OSX 10.5.6, and feeling stymied. % gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config Building native extensions. This could take a while... Successfully installed mysql-2.7 1 gem installed % irb -rubygems -rmysql irb> Mysql.init dyld: lazy symbol binding failed: Symbol...

How can I change the default configuration for WCF?

I have WCF Client initialized like this MyServiceClient client = new MyServiceClient(); so it uses the app.config to read the endPoints. I would like to dynamically change the default config file to a file I define. I know I can open a configuration file like this: Configuration myConfig = ConfigurationManager.OpenExeConfiguration ...

Shared configuration files in .NET

I have a solution that includes both a web and a Windows NT service application. These are of course two different projects but within the same solution. They do however share a lot of the same configuration. Currently I have the same values in both the web.config and the app.config file. This is starting to get messy and I'd like to h...

Create a WPF library in Visual Studio Express

I am trying to make my code more reusable by placing commonly recurring utility classes and user controls into a packaged library. The IDE is making this difficult, as so far, I have found that it always defaults to Windows Forms user controls and disabling my ability to create xaml files etc from the 'Add a New Item' dialog. Is it poss...

Moving Settings to another config file

Hi. Is it possible to move applicationSettings to another config file as it is possible with connectionStrings or appSettings? When I create Settings for my web application using the designer I get applicationSettings section in my web.config such as: <applicationSettings> <TestWebApplication.Properties.Settings> <setting...

Simplify configuration dialog building .NET

Hi, I am working in C#. I find myself creating dialogs for editing my application settings all the time. For every control on the dialog I am reading the configuration file and set it accordingly. After pressing OK, I am reading all the controls and store the values in the configuration files or something similar again. This seems to b...

Postfix / Spamassassin: Undelivered Mail Returned to Sender

I'm having an issue with a newly configured mailserver where spam emails that are spoofed to come from the local domain are actually accepted by the mailserver, the mail isnt delivered as is though, the spamassassin tags it as spam and then send an email "Undelivered Mail Returned to Sender" to the spoofed local user. I know there is a ...

Yaml merge in Python

So I'm toying around with the idea of making myself (and anyone who cares to use it of course) a little boilerplate library in Python for Pygame. I would like a system where settings for the application are provided with a yaml file. So I was thinking it would be useful if the library provided a default yaml tree and merged it with a u...

Encrypt the connectionString used by the log4ent AdoNetAppender

I'd like to encrypt the connection string used by the log4net AdoNetAppender. Can this be done without encrypting the entire appender? Dion Olsthoorn blogged about setting the connection string in code, but I'd prefer to do it in a config file that is dedicated to logging as it will be using a different database to the rest of the appl...

Build configuration in C# code

Does anyone know how to get the current build configuration $(Configuration) in the C# code? ...

Do I have to derive from ConfigurationSection to support per-user settings?

I'm playing around with .NET's configuration support (the ConfigurationManager class and related support classes). I would like to write an application that, once installed: Has default settings in foo.exe.config (in Program Files). The user may later override the settings with nondefault values which should be persisted. The user's p...

VS2008 insists on defaulting to "Itanium" for Active Solution Platform in C++

I just started using C++ VS2008, and downloaded an archive of samples from MSDN. The file is vc_samples.exe - sorry, don't have a link right now. My problem is, most of these examples would not compile. The Start Debugging button (green arrow) was disabled, with no explanation whatsoever from the IDE. More by luck than skill, I stumb...

"Lost" SQL server database

This is a really strange one. I am using SQL Server Express 2005, and have the following connection string (in a DotNetNuke web.config): Data Source=ELECTROMORPH\S15304561;Integrated Security=True;User Instance=True Note that there is no AttachDbFilename parameter - so I'm not sure how SQL server even knows what to connect to. But it...

Visual Studio 2005 won't compile in Release Configuration mode

SUMMARY: How to compile in Release mode...I cannot get it to "take" what I want to do. I have a webservice project in VS2005 C# that I am trying to optimize. One of the things I've had my awareness raised on is the recommendation to compile in Release mode. I am not sure what to expect here but here is what I am seeing: I rightmouse on...

How to place certain files in the root directory of the Grails server?

I am using a grails application as backend for a Flex frontend. To be able to easily develop and debug my applications I would need to place a crossdomain.xml file into the root of the server, i.e. it must be accessible via http://localhost:8080/crossdomain.xml. Similar use cases might be the deployment of a favicon.ico or a robots.txt, ...

Ant replace in maven2?

I'm looking for some way to replace patterns in files with values, during build time. E.g. a configuration file may look the same except that different machines requires different hostnames in some setting. In that case i want to have a template file, where hostname is replaced with @@hostname@@ Then when building, I want to create sep...

How to initialise a C program using file, environment and/or command line?

In C, how to configure the initial settings for some program, using key-value pairs, with any or all of: a plain text configuration file, environment variables, and options on the command line. Also, how to decide which method's values overide those from either of the other two. Then if values have been changed, to optionally update the ...

Configuration files per assembly

Is it possible to use the .NET configuration objects to get at .config files specified for a class library assembly rather than the executable assembly. For example: I'm working on a .net port of Concordion and I would like to have options that are specific to Concordion itself but there are also options that are specific to each speci...

Ordered resolution of types from Castle Windsor AllTypes

I have a group of classes that implement an interface for my application start-up activities. Here is the registration code: private static void ConfigureContainer() { var container = new WindsorContainer(); container.Register(AllTypes.Of<IStartupTask>() .FromAssembly(Assembly.GetExecutingAssembly())) ... ...

How do you manually insert options into boost.Program_options?

I have an application that uses Boost.Program_options to store and manage its configuration options. We are currently moving away from configuration files and using database loaded configuration instead. I've written an API that reads configuration options from the database by hostname and instance name. (cool!) However, as far as I...