Hi
In .NET it is possible to add a file-attribute in the appSettings-element of
a configuration-file so that if the file exists it will be used instead of
the values in the normal config-file. In .NET 2.0 there are a lot of new
configuration-sections, like connectionstrin gs, and the ease of using
Settings in projectfile, but I haven't seen any possibility to override that
settings in an external file. Is there anything like the file-attribute of
the appSettings, carried forward to any other parts of the configuration
system (for example in the connectionsstri ngs-section)?
Thanks, Eric 1 2008
Eric:
If I understand your problem correctly, you can use the
OpenMappedExeCo nfiguration method of the ConfigurationMa nager to accomplish
this http://msdn2.microsoft.com/en-US/lib...on(VS.80).aspx
Specifically, you specify a FileMap (Execonfigurati onFileName) to accomplish
this http://msdn2.microsoft.com/en-US/lib...onfilemap.aspx
If I understand you correctly, this should work, otherwise let me know and
I'll do what I can.
Cheers,
Bill
"Eric" <eq****@hotmail .com> wrote in message
news:Ot******** *******@tk2msft ngp13.phx.gbl.. . Hi
In .NET it is possible to add a file-attribute in the appSettings-element of a configuration-file so that if the file exists it will be used instead of the values in the normal config-file. In .NET 2.0 there are a lot of new configuration-sections, like connectionstrin gs, and the ease of using Settings in projectfile, but I haven't seen any possibility to override that settings in an external file. Is there anything like the file-attribute of the appSettings, carried forward to any other parts of the configuration system (for example in the connectionsstri ngs-section)?
Thanks, Eric This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: phillip |
last post by:
This is interesting, I have attached my web.config file and the
exception I have been logging. I created a library which provide data
access to a database and a control system. The library is written in
C#. I created a small .exe file to test that the library builds
propertly from configuration and that it communicates properly. This
work great in the System.Windows.Forms. However, when I use the
library in a web enviroment things...
|
by: Water Cooler v2 |
last post by:
I know that we can add a single name value entry in app.config or
web.config in the configuration/configSettings/appSettings section like
so:
<add key="key" value="value" />
Question: I want to add a dictionary of name-value pairs. In other
words, instead of a single name-value, I want to add a name-value
collection in there. I could do this:
|
by: Jess Chadwick |
last post by:
I am attempting to use the Enterprise Library (Jan 2006) Cryptography block
to encrypt a credit card number in my ASP.NET 2.0 Commerce Server
application. Everything is configured correctly, as evidenced by the fact
that it is running on a production box using the same web.config (but not
the same parent web.config). When I call the EncryptSymmetric() method, I
get this error:
Server Error in '/Store' Application....
|
by: Michael Lang |
last post by:
I was basically wanting to know how to use the System.Configuration
namespace to be able to load an arbitrary number of unknown attributes on an
element in a custom section in the .config into a NameValueCollection.
Basically I want to do something similiar to what occurs with a
System.Configuration.Provider.ProviderBase Initialise method - the provider
is passed a NameValueCollection containing attribute names and their
associated...
|
by: Jeff Hegedus |
last post by:
I have a dll that requires some configuration data. I put the configuration
data in a custom configuration section in a config file that is loaded in
the installation folder of the dll. If I install the dll to the same
directory as the exe which uses it, everything works as expected but if I
load the dll in any other directory, I get the following error...
2007-02-04 16:36:51,171 DEBUG CentrifugeBHO.CentrifugeBHO -
dllPath =...
| |
by: Alberto |
last post by:
Can you tell me how to read and modify a value in the app.config file using
this class?
Thank you very much
|
by: Arno R |
last post by:
Hi all,
I am sending mail from my apps with CDO nowadays.
However I have one client where this will not work until now.
I am thinking this is related to the provider where the client has his internet-account.
I am using cdosys with 'late binding'. I try to send mail with an attachment to a few mailaddresses (strTo)
The *exact same code* (with other smtpserver-login and pw strings) does work on various other PC's with various other...
|
by: =?Utf-8?B?RG91Z2llIEJyb3du?= |
last post by:
Hi
I've written custom configuration section (inherits from
System.Configuration.ConfigurationSection) to simplify the contents of the
config file and to make life easier when accessing them in code.
The configuration section is contained within the exe (it's a simple test
case!) and everything works well debugging within the IDE or if the
application is deployed on a drive or share that has been granted full trust.
For the share the...
|
by: Mike |
last post by:
Hi
I have problem as folow:
Caught Exception: System.Configuration.ConfigurationErrorsException:
An error occurred loading a configuration file: Request for the
permission of type 'System.Security.Permissions.FileIOPermission,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' failed. (machine.config) --->
System.Security.SecurityException: Request for the permission of type
|
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= |
last post by:
Hi, thanks, mister
The code
string rutaConfig = tbRutaConfigServicioBase.Text;
'// Map to the application configuration file.
ExeConfigurationFileMap configFile = New ExeConfigurationFileMap();
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |