473,385 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Configuration

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 connectionstrings, 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 connectionsstrings-section)?

Thanks, Eric
Mar 1 '06 #1
1 1972
Eric:

If I understand your problem correctly, you can use the
OpenMappedExeConfiguration method of the ConfigurationManager to accomplish
this
http://msdn2.microsoft.com/en-US/lib...on(VS.80).aspx
Specifically, you specify a FileMap (ExeconfigurationFileName) 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***************@tk2msftngp13.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 connectionstrings, 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 connectionsstrings-section)?

Thanks, Eric

Mar 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
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...
5
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...
1
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...
4
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...
6
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...
8
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
7
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...
7
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...
3
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...
0
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.