Web.Config - Custom.Config

Hello,

I am in .NET 1.1

I have a custom.config to overwrite my web.config file and I would like to centralize the configuration like:is it possible top have several path for the custom files?

<files path="~/custom_standard/">

   <file ..../>

</files>

<files path="/custom_specific/">

   <file.../>

</files>

or

<files path="~/custom_standard/">

   <file ..../>

<path="/custom_specific/">

   <file.../>

</files>

 

Thanks


Dom
0
Dominique
12/14/2007 7:07:49 PM
asp.net.config-deploy 12495 articles. 0 followers. Follow

5 Replies
829 Views

Similar Articles

[PageSpeed] 54
Get it on Google Play
Get it on Apple App Store

If you have subdirectories, just put web.config files in those subdirectories to override the web.config in your root directory.


Christopher Reed
"The oxen are slow, but the earth is patient."
0
Careed
12/18/2007 6:00:14 PM

Chris,

This means I need the custom.config in each sub-directories...39 of them I hope not to forget to uipdate all of them at once!!!Big Smile

Thanks


Dom
0
Dominique
12/18/2007 6:06:34 PM

First of all, if it's a web application, you would use web.config.  Second, you would only include elements unique to that subdirectory.

Another approach would be to use the location element in your root-level web.config. 


Christopher Reed
"The oxen are slow, but the earth is patient."
0
Careed
12/19/2007 2:37:24 AM

Hi Dominique,

As far as I know, only the appSettings element has the feature to specify an external config file. If you just want to set different appSettings for each sub-directory, you can refer to the following section:

<configuration>
  <location path="ABC">
    <appSettings file="XMLFile1.config"></appSettings>
  </location>
  <location path="EFG">
    <appSettings file="XMLFile2.config"></appSettings>
  </location>
  <system.web>
     ………….
  </system.web>
</configuration>

If you want to set different settings in each system.web section, you have to input them in the root web.config (or create web.config in each sub-directory), the external file doesn’t work for this secnario. The sample config section will be like the following:

<configuration>
  <location path="ABC">
    <appSettings file="XMLFile1.config"></appSettings>
    <system.web>
       ………….
    </system.web>
  </location>
  <location path="EFG">
    <appSettings file="XMLFile2.config"></appSettings>
    <system.web>
       ………….
    </system.web>
  </location>
  <system.web>
    ………….
  </system.web>
</configuration>


Sincerely,
Benson Yu
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
0
Benson
12/19/2007 2:53:37 AM

Thanks I will do this


Dom
0
Dominique
1/3/2008 8:39:40 PM
Reply:

Similar Artilces:

running 2 web.configs in the same website 1 in /web.config and one in /swf/web.config
Im having issues doing this. and when i remove the authentication from the swf/web.config it still doesnt seem to be applying to the child website at all. Whats the proper way to set a child website? Thanks!!  The lower most web.config overrides all previous settings. So if you remove the section from the /swf/web.config whatever settings you have in the web.config in the next higher level will have an effect on the content of the child folder.So instead of removing a section, try giving appropriate settings in the /swf/web.config....

Need to put this in a web.config file. Transfer a collection from app.config to web.config.
<!--<setting name="Groups" serializeAs="Xml"> <value> <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <string>GL CA Corporate Data</string> <string>GL CONT Contractors</string> <string>GL IT SolutionDelivery</string> </ArrayOfString> </value> </setting>-->   I need to put this in the below web.config.<?xml version="1.0"?><!-- Note: As an alternative to hand editing this fi...

Web Deployment Project - Config Properties
I'm using a Web Deployment Project to compile my web site. In the Property Pages - Configuration Properties - Deployment section, there is an option to 'Enable Web.config file section replacement'. I have this working to replace certain sections of my web.config for each build config (release/staging/dev). I think this makes sense so other developers do not have to remember to change the web.config file. HOWEVER, this only seems to work when replacing parts of web.config; such as appSettings, connectionString, etc. This would require me to have separate config files for each section and bui...

Read info from web.config, machine.config, app.config....
I know how to read info from the web.config, see code:  Protected path As String = "/Framework" Protected config As Configuration = WebConfigurationManager.OpenWebConfiguration(path) How can I read also the data from machine.config and other config files, like the app.configs?Johan TheunissenMCPD, MCSE, MCTS BizTalk 2006==============================Please mark the most helpful reply/replies as "Answer". ...

app.config and web.config deployments and installers
I use web deployment projects for changing web.config values based on the configuration build types I have setup (dev/test/stage/prod) and it works excellent for building installers in multiple environments.  Now, I am trying to do the same the Windows Applications.  How can I automate the changing of app.config values based on the build configuration (dev/test/stage/prod)?  Any help would be much appreciated. Thanks,Chris...

[PATCH lib/Net/Config.pm, MANIFEST, t/lib/Mock/Socket.pm, lib/Net/Config.t] Add Tests for Net::Config
Here's a test suite for Net::Config. In the process of writing this, I've fixed an apparent bug that prevented single values from becoming array references when necessary. I think it's right, but perhaps Graham should weigh in on this. In the process, with some advice from perl-qa, I've added a mock object so the test could control the output of Socket::inet_ntoa() and Socket::inet_aton(). t/lib/Mock/ seemed like as good a place as any. I'm happy to rework this patch if it personally offends anyone whose opinion matters. :) -- c --- lib/Net/~Config.pm S...

Config ScriptManager into Web.config
Hi all,  it's possible to config scriptmanager properties into web.config? Properties such as ScriptMode, OnAsyncPostBackError event, AsyncPostBackTimeout, etc.. Thanks!Nicola----------------------------http://www.nicolaceliento.it----------------------------When you make an extended application you cannot say "It works!".. but you can only say "I did not find any error yet.." Hi, I don't think so. But i guess what can be done is that you can add an element in the <appSettings> and then access the value from the code behind. Here is some psuedocod...

App.Config/Web.Config
I have setup custom config sections. I need to know how to loop through a configuration group and get all of the config sections in that group. Thanks could you post an example of what you have Trey Exactly, your question is not clear at all. Regards.Bilal Hadiar, MCP, MCTS, MCPD, MCTMicrosoft MVP - Telerik MVP...

Machine.config and Web.config
Is there a way to get VWD to default to storing DB Connections and provider information in the projects web.config instead of machine.config? When I use the web admin feature it stores everything in the machine.config. The reason I ask this: I am developing the web apps local using my production DB server. I would like to just upload the site to the production server and ahve it work. We host multiple sites and I would like for all the site specific config information to be stored in it's own web.config. I know i could manually set it up in the web.config, but it would be nice to ...

gmail config on web.config
Hi, I'm using the default security login control (login, forgot password...)I've trouble as gmail.com user to send e-mail for new password, regarding the STARTTLS command.I already wrote this in my web.config :  <system.net>  <mailSettings>      <!--   <smtp from="yahooname@yahoo.com.sg">    <network host="smtp.mail.yahoo.com.sg" password="xxxxxxxxxx" userName="yahooname"/>      </smtp>    &n...

Merging my web.config.mylibrary with the web.config
I see multiples web.config files in the framework 2.0 folder.  There is a way to had a web.config.mylibrary file that contains part of the configuration section.For example, I want that the profile section to be in the web.config.mylibrary file and when the web site will be load, the two web.config will be merge.  Is it possible to such thing ? Hi Biz, It is possible to-do this using the configSource property on configuration section elements.  You could then store different configuration sections in different configuration files in a distributed way.Here is a MSD...

Machine.config and web.config
If i have a key named X in my machine.config which equals to the value X and a key named X(same name as the one in the machine.config) in my web.config which equals to the Y.When i use my code to read in the configuration appsettings key.What value will it read in?X or Y? Y The web.config will override values set in the machine.config. You can also overrride values in each directory of your application (or each file for that mater) by setting <location> tags....

Machine.config and Web.config
 I want to know list of settings in machine.config which cannot be overridden in web.config.. Thanks a lot in advance  I don't think that this information is specifically listed anywhere, but you can look in machine.config and look for: allowExeDefinition="MachineOnly"If you're running IIS 7 you need to also look at applicationhost.config and overrideModeDefault="Deny"...+++ Rick ---   Rick StrahlWest Wind TechnologiesMaking waves on the Web www.west-wind.com/weblog Thanks for reply can u tell me how can i look my IIS version...

App.config/web.config
Hello!! I'm development a web application in n-tiers. The UI have a web.config, and the other tiers using app.config. The problem is that the application doesn´t recognize the app.config files. Only the web.config of the UI. For example: I try to put the connections string in a app.config in the data access, but when it runing, throws a error that says: "Database undefined". But when I put the connections strings in the web.config, it runing well. I need help!!!Alvaro HdezDeveloper To use xml atributes from WebConfig and AppConfig u must add referance to System...

App.config to Web.config
I have been running a console app, to process a paypal payment.  The code gets a value from the app.config file. <add key="PAYFLOW_HOST" value="payflowpro.paypal.com" /> However I have now incorporate the code into a web application and put the key into my web.config file, will the code now know to look for this key in this place? If your code is getting the value from your config file using ConfigurationManager.AppSettings["PAYFLOW_HOST"] then it should use the correct config file automatically.  Console apps, windows services and wind...

Web resources about - Web.Config - Custom.Config - asp.net.config-deploy

Proxy auto-config - Wikipedia, the free encyclopedia
Computer operating systems (e.g., Microsoft Windows , Mac OS X , Linux ) require a number of settings to communicate over the Internet . These ...

Platform Updates: New Industry Pages, Refreshed Services Status Page, and New Parse Config Dashboard
Platform Updates: New Industry Pages, Refreshed Services Status Page, and New Parse Config Dashboard

App Config for Android - YouTube
Free version: https://play.google.com/store/apps/details?id=fi.aarosoft.appconfig.free Full version: https://play.google.com/store/apps/deta ...

HP unveils cloud config manager
HP this week unveiled a network virtualization system for large enterprise and cloud providers designed to simplify network configuration.

China configs 'firewall' against official meddling in judicial cases
China configs 'firewall' against official meddling in judicial cases

Apple adds bogus AppleTVs, iPads, iPods and iPhones to another config file, won’t deter developers
Earlier today, Mark Tweeted the amusing new file Apple put in iOS 5.1 beta 2 which includes a lot of silly references to devices that don’t exist. ...

System Software: Configs for Mac 128K, XL, 512, & 512KE (7/94)
Macintosh 128K Currently ships with: Product no longer available. Supports: System 2.0 and Finder 4.1. Recommended: System 2.0 and Finder 4.1. ...

Free 32GB Apple TV and $60-$111 discounts on iMac 4Ks & iMac 5Ks, plus $150 coupons on all custom configs ...
Whether you want a free Apple TV plus discounts, a free AppleCare extended protection plan plus discounts, or just the lowest prices anywhere ...

Dell releases updated XPS-13 Developer Edition in wide variety of configs
... is available immediately in North America and Europe. According to Dell’s announcement blog post , there is a wide variety of possible configurations ...

Config error at Boston-area hosting company takes down Reddit, others
... hosting provider briefly knocked several large services and websites dependent on Amazon and AWS offline on Tuesday night, thanks to a configuration ...

Resources last updated: 1/4/2016 10:51:47 AM