app.config configuration sections are nice, but I often need multiple configuration sets, but with small difference.
what I want is:
Have one section with default configuration (this one is created with the designer, and thus has the auto-generated strongly-typed accessors in the Settings class
Another section with only the "new" item...
Does anyone know how to disable authenticode signature verification in a .NET executable (to avoid slow startup) without using an application config file? In other words, do this:
<configuration>
<runtime>
<generatePublisherEvidence enabled="false"/>
</runtime>
</configuration>
without an app.config. Is it possible?
...
I am unit testing a .NET application (.exe) that uses an app.config file to load configuration properties. The unit test application itself does not have an app.config file.
When I try to unit test a method that utilizes any of the configuration properties, they return null. I'm assuming this is because the unit test application is ...
I have some library code which is used from my application and is also used by a .NET custom action in a Visual Studio installer project. The library code in turn uses the Enterprise Library logging block to do its logging. How can I get configuration information to the Enterprise Library in the context of my custom action running insi...
I am writing a .NET library that for various reasons cannot be registered in the GAC.
This dll (let's call it SDK.dll) depends on other DLLs in order to be loaded.
When writing a program that uses this SDK.dll, I noticed that my program failed loading the dll with a FileNotFoundException thrown. This happens because although I was able ...
Are there any built in methods in System.Configuration that would allow one to backup the currently running apps XXX.exe.config file. Or if not, how would one retrieve the current applications config file name for backup.
...
We have a custom section in my app.config file related to our IoC container class. How can I get intellisense when editing the config file for this section, as well as getting rid of the compiler messages informing me of the missing schema.
I found this question here: app.config configSections custom settings can not find schema informa...
I wrote this piece of code to merge two .NET configuration files: Add non existent nodes and override values on existing ones.
I avoided to use the much faster reader/writer way because the app I'm using it for is not performance critical. What do you think of this?
using System;
using System.Xml;
namespace devcoach.FrameworkExtension...
I know that I can load an app.config file from a different location using the following line of code:
AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", ConfigFile);
where ConfigFile is a full path location. What I'd like to do though is be able to load a file that has been encrypted for the app.config. Ideally, I'd like to be able to...
Hi,
Little confused looking at my app.config, it looks like this:
<system.serviceModel>
<servcies>
<service>
<endpoint address="" binding="basicHttpBinding">
<identity>
<dns value="localhost"
</identity>
<endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
...
I've got an assembly containing several WCF services, each with its own contract. It all works nicely. The service config in the app.config for the service looks like this:
<services>
<service behaviorConfiguration="WcfService.AlyzaServiceBehavior"
name="Sam.Alyza.WcfService.ServiceWebsites">
<endpoint address="" binding="netT...
Is there a way at runtime to switch out an applications app.config (current.config to new.config, file for file). I have a backup/restore process which needs to replace its own application.exe.config file. I have seen this post but it does not answer how to do this at runtime.
...
I have a VB6 app which calls a .NET assembly, which references settings from the app.config file. By default, .NET looks for a config file named after the VB6 app. How can I redirect it to use a different config file name? This needs to become the default config file so that e.g. WCF settings are read from it.
...
In my winform app, I am trying to add a userSetting, although the error is occuring with appSettings too. When the setting is added I get an exeption thrown that says: "Configuration system failed to initialize" with a Inner Exception "Unrecognized configuration section userSetting"
Exception Details:
System.Configuration.Configuration...
What are the minimal settings i need to do for a streamlined WCF config in the app.config?
The default one is this:
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
byp...
In my application, I need to change some value ("Environment") in appSetting of app.config at runtime.
I use AppSettingsReader
private static AppSettingsReader _settingReader;
public static AppSettingsReader SettingReader
{
get
{
if (_settingReader == null)
{
_settin...
You can change the connection string at run-time like this. You make the connection string setting available for writing as a separate property inside the MySettings class:
Partial Friend NotInheritable Class MySettings
Public WriteOnly Property RunTimeConnectionString()
Set(ByVal value)
My.Settings("MyConnectionString") = value
...
I have a class of type ISimpleCache<IBrokeredDataObject> that I want to add as a type alias (then a type) in the App.Config file
the line
<typeAlias alias="ISimpleCacheOfIBrokeredDataObject" type="MyApplication.ISimpleCache<IBrokeredDataObject>, MyApplication" />
is obviously wrong due to the <>, however I'm not convinced escaping th...
I have a solution with 10 or so projects in it, and have started having issues with SystemConfiguration returning empty configuration instead of locating my App.Config file.
Should I have multiple App.Configs, one for each project (I am assuming and hoping not), if not, where is the best place for it to be located in my projects?
...
I have inherited a rather large project consisting of an application written in VB6 and several DLL's and ActiveX controls written in VB6, VB.NET 1.1 and VB.NET 2. I want to change one of the settings for one of the DLL's written in VB.NET 2 that is in its application.dll.config file, but it seems to be having no effect.
My main VB6 app...