configuration-files

Updating config file and updating the values in application

放肆的年华 提交于 2019-12-05 13:02:25
I am currently updating a few settings in a rather large *.exe.config file via the *.exe executable by using XLinq to navigate the directories and read / write the values. The problem with updating this way is that changes only take effect after restarting the executable, but I would like the changes to take effect instantaneously. Is there a way to tell the executable to reload the *.exe.config file after I make the changes? All help is appreciated and thanks in advance! Exoskeleton for app.config <configuration> <system.serviceModel> <!-- stuff... --> <client> <!-- this is the section I

Best practices to create connection files

做~自己de王妃 提交于 2019-12-05 12:20:59
I have an application which i have some configuration files for cache, queue, and database. public class ServerConfiguration: ConfigurationSection { [ ConfigurationProperty( FOO, DefaultValue = "", IsRequired = false ) ] public string FOO { get { return (string)this[FOO]; } set { this[FOO] = value; } } } this is what i do for config files and I also have some inheritance hierarchy. What do you use to handle configurations and what are some best practices for this purpose? I love and use the Microsoft configuration library extensively but I try to make sure that my applications are not

apache-commons-config PropertiesConfiguration: comments after last property is lost

我怕爱的太早我们不能终老 提交于 2019-12-05 11:44:18
I am using PropertiesConfiguration to edit property file. This allows me to retain comments. All works fine except for comments that comes after the last key.. For example input file # *** A comment GameCheck.no=No **# end coment** The output is as below. It lost comment that was after last key # *** A comment GameCheck.no = myvar The code as below. package trials; import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.commons.configuration.PropertiesConfigurationLayout; import java.io.FileWriter;

FitNesse configuration files

泄露秘密 提交于 2019-12-05 08:33:05
I'm using FitNesse as a functional testing framework. I'm running into trouble when FitNesse runs code that needs configuration. If I need to get a connection string from the configuration file, I can get it to work by adding it to the FitServer.exe.config. However, I don't like that solution. I would like FitNesse to load my own configuration file, namely TheNameOfMyApp.dll.config. Is this possible? Sure, easy to do. I'm assuming you're using the dotnet or dotnet2 test runner. I'm using the dotnet2 test runner, and here's how I've got it set up: First, when you !define your COMMAND_PATTERN,

C/C++ Unix configuration file library [closed]

霸气de小男生 提交于 2019-12-05 05:27:33
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . Where can I find a C or C++ library for reading and manipulating Unix configuration files ( format: name=value\n )? 回答1: For plain C, libconfuse is quite good 回答2: I will advice you to use boost::property_tree library for C++. It has quiet detailed manual. Further I'll advice you to use "info" config file. Example

Edit configuration file through python

一曲冷凌霜 提交于 2019-12-05 04:03:50
I need to edit a configuration file through python and i tried searching on stackoverflow and google and they don't cover my situation, since i need to replace lines in the file and perform matches in my search. Also, what i found covers how to do it for one line, i will be performing at least 8 line replacements in the file and I would like to know if there is a cleaner and more elegant way of doing this than putting 10 replace(foo, bar) lines altogether. I need to "match" lines like "ENABLEPRINTER", "PRINTERLIST", "PRNT1.PORT". I want to match thesse text and ignore whatever follows (ex: "

Spring : Exception starting filter springSecurityFilterChain

纵饮孤独 提交于 2019-12-05 01:37:05
I am trying to write an application using Spring 3.1.2-Release . App server is Tomcat 7 . When I start the server I get this error : SEVERE: Exception starting filter springSecurityFilterChain org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSecurityFilterChain' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:553) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1095) at org.springframework.beans.factory

Configuration System Failed To Initialize

爱⌒轻易说出口 提交于 2019-12-05 00:54:32
In my application when I try to get the connection string by using this code : System.Configuration.ConfigurationManager.ConnectionStrings["ConStr"].ConnectionString; It throws an exception that "Configuration System Failed To Initialize". Where is the format of app.config wrong ? <?xml version="1.0"?> <configuration> <connectionStrings> <add name="ConStr" connectionString="Integrated Security=false;Persist Security Info=False;User ID=funny;password=veryfunny;Initial Catalog=vegimanager;Data Source=.\sqlexpress;"/> </connectionStrings> <configSections> <sectionGroup name="userSettings" type=

Is possible to split PHP configuration file php.ini?

三世轮回 提交于 2019-12-05 00:12:16
Anyone working with php knows that php.ini is a big file that may cause headaches when you need to change over ssh. For example I can change nginx.conf using include directive to load all of the files under sites-enabled dir into the main nginx.conf. So my question is straightforward: It's possible to do the same thing with php.ini ? Mike B If your PHP installation is setup to scan for .ini files you can drop several of them in a folder. If you installed PHP through the Ubuntu repos, it should already be configured this way. My phpinfo() (note: The additional ini files are the result of

Adding a body to a HttpWebRequest that is being used with the azure service mgmt api

主宰稳场 提交于 2019-12-05 00:09:40
How would i go about adding to the body of a HttpWebRequest? The body needs to be made up of the following <?xml version="1.0" encoding="utf-8"?> <ChangeConfiguration xmlns="http://schemas.microsoft.com/windowsazure"> <Configuration>base-64-encoded-configuration-file</Configuration> <TreatWarningsAsError>true|false</TreatWarningsAsError> <Mode>Auto|Manual</Mode> </ChangeConfiguration> Any help is much appreciated byte[] buf = Encoding.UTF8.GetBytes(xml); request.Method = "POST"; request.ContentType = "text/xml"; request.ContentLength = buf.Length; request.GetRequestStream().Write(buf, 0, buf