Customize the published web.config file in a web app

We are a team developing an ASP.Net web app. We are facing the following situation: each development machine needs a slightly different web.config file. For example,

  • each local developer machine.
  • the continuous integration server.
  • the open sandbox website.
  • the production website.

How do I customize the published web.config (through MSBuild for ex.). Does anyone has an idea on the matter?

 Thanks in advance,



12/16/2006 8:59:45 AM 1239 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 53

One possible solution is:

- select one Web.Config (I usualy select development one) as a starting point

- create XSLT files for any other Web.Config which do necessary transformation from starting Web.Config to new one

- use some tool (I am using  nxsltnxslt2 ) in your build process to generate proper Web.Config

This works rather good for me and company for which I work for.

Dejan Vesić

MCAD for .Net technologies | | Blog:
12/16/2006 10:26:33 AM

Similar Artilces:

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="" xmlns:xsd=""> <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...

How do I merge web services' app.config with web app's web.config? Help!!
I have a web application project that uses a separate class library containing web service references (service layer). I want to be able to configure the web reference URLs dynamically and I know you can set this up by setting the URL behavior to  'Dynamic', etc, etc. The problem is VS2005 puts the URLs in the project's app.config file. When the class library becomes a DLL component, I have no way of accessing the app.config file.Is there a way to make the web reference project to look for the URLs in the web.config instead of its app.config? Or is there a way to merge this app.config w...

web deployment project won't compile when doing a web.config file section replacement on a custom section
The custom section in my web.config file looks like: <configSections>    ....    <section name="management" type="Integration.CustomConfiguration.ManagementSection, Integration.CustomConfiguration" />    ....</configSections> .......<management>    ....</management> The web project builds fine, however, when I attempt to build using a deployment project (so that I can do web.config file section replacements) I get the following error:Error    34    An error o...

how to package VS Web Site App to be published as a Project web site on a production web server in a sub folder of the main website
Hi, I created a VS2k5 Website and used the web site using the small business starter kit as a model.  I published the website to a folder and runs fine.  I decided to copy the website to a folder within another website so when you click on a link it will open up the website start page.  That does not work.  My problem is that I need to publish the website as a project that includes all the tools I used so it can be uploaded to a subfolder into the website and the main webdb page will open.  Is their a way for me to deploy the website a a project? I am open ...

VS 2005 SP1 + .NET AJAX => automatically adds web.config in nested Web Application Project when opening project or solution
I get a 'Configuration Error' on an aspx page because VS added automatically a web.config to my nested Web Application Project where no web.config file should be. This effect I have noticed since I have installed SP1 and .NET AJAX Extensions. Why is VS 2005 adding the web.config file and how can I disable this behavior? Following is the content of the automatically added web.config file (comments omitted): <?xml version="1.0"?><configuration>    <appSettings/>    <connectionStrings/>    <system.web> &...

Web.Config parsing error in Web App Projects with IIS
Has the Schema of the Web.Config changed in Web App Projects?  After converting my 2005 Web Site project to a 2005 WAP, and switching to IIS Web Server, I am getting a number of errors at run time in my web.config files starting with: Unrecognized attribute 'type'.  This error occurs when parsing the web.config file where first highlighted below.  I do not see the referenced type in the GAC (System.Configuration.ApplicationSettingsGroup), should it be there?  System.Configuration and System.Configuration.Install is referenced by the project. ...

How to specify custon HTTPHandlers in web.config in VS2005 web app?
Hi,Please guide me out of this issue:Here, I have got a web application project using VS 2005, wherein I want to point all my .aspx requests to a particular httphandler, all the plumbing in implementing a class extended from IHTTPHandler being in the same assembly, I have got stuck in the web.config wherein I have to map the request type with the handler something like this:<add verb="*" path="*.aspx" type="abc.xyx.MyHttpHandler,WebDashboard"/>The problem here is that at runtime the assembly is not being located, and hence a vanilla screen each time I run the app, with the foll...

Web App connecting to database using web.config file
I am using the web.config file to store my database connection string. Everything was working fine when I was running to applicaiton on my local machine. However, when I deployed to the web I keep on getting this error: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) at System.Data.SqlClient.SqlConnection.Open() at Dev_verI.Basi...

Web apps without Web Projects
For the 1.1 web application we work with, we've converted the Web Project to a normalclass library project, per the instructions found here: immediate reason was that VS2003 has a bug which can't deal with Subversion's .svn directories on a Web Project.Now, we're really, really trying to push a 2.0 conversion into the near future, but are being frustratedby the fact that VS2005 seems to make it harder, not easier, to have a web site that is not a magicalWeb Project.After tweaking what feels like several thousand pa...

one application has many web.config files which web.config file execute first?
hi to all In my application i will add three web.config file which will execute first. how to set it. Give me a guidlines. by Devan.G Hi,You can't add multiple web.config to applicationYou can add single web.config to each folder present in sub directories of your applicationYou can override the web.config files using multiple config files.SatalajWatch The true story of internet ||Yet another forum |||I'm big fan of Open source flash chart for .net very very simple I n t e r v i e w T i p s Hi, You can check this reference:

web app vs web site vs web project
Could someone describe the differences between web sites, web apps and web projects? (or send me a link that contains this comparison?). Is one of these terms synonomous with another? What are the advantages/disadvantages of each?  How does one choose when starting new development? Can one type be converted into another?     Thank you. Here is my definition: Website: perspective of users. Collection of web pages.Webapp and project: perspective of developer (and webmasters). Collection of web pages and resouces (database, code, etc.). Maybe software installers...

How to write a file into web project folder from inside a custom web control?
ZedGraph control do something like that. And I want to achieve the same effect. I am making a custom server control with a background image and the image is generated on-the-fly. I want to save it somewhere in the referencing project, like a default temperary image folder. How do I achieve this in my custom server control code? solve now by saving with Page.Server.MapPath("~/where you want to save") and retrieve by Page.ResolveUrl("~/where you saved") maxi_ng: solve now by saving with Page.Server.MapPath("~/where you want to save") and retrieve by Pag...

web web web
Name: bahadir Email: Product: Firefox 2 Beta 2 Summary: web web web Comments: web sayfası yapmak Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.8.1b2) Gecko/20060821 Firefox/2.0b2 ...

Web deployment projects and web.config file section replacement
Hi,I am trying to get to grips with the Web Deloyment projects and it keeps on failing to compile - falling over when it comes to the web.config file section replacement.Has anyone got this bit working?  I keep on getting the error:Error    1    web.config(1): error WDP00002: missing section appSetting.I'm wondering if it has anything to do with the format of the appSetting file I am using.I have added 'appSetting=/config/staging/appsettings.config;' to the deployment project and then have the appsettings.config file formatted like this:<?xml version="1....

Web resources about - Customize the published web.config file in a web app -

IPhone App Gabi Lets Users Customize Their Facebook News Feeds
iPhone users who want a different way of catching up with their Facebook news feeds have a new option in the form of Gabi , a $0.99 application ...

Facebook allows advertisers to customize headlines for page, app and event ads
Facebook will now let advertisers customize the headlines of their ads within the sidebar. This will be available via the API, Power Editor and ...

Battery Tips! Free! ~ monitor battery power level & health status with customize wallpaper and battery ...
Get Battery Tips! Free! ~ monitor battery power level & health status with customize wallpaper and battery theme feature on the App Store. See ...

Bloglines: Customize Start Page - Flickr - Photo Sharing!
Explore Tamar Weinberg's photos on Flickr. Tamar Weinberg has uploaded 4087 photos to Flickr.

[iOS Advice] How To Customize Spotlight Search Results- YouTube
Need more iOS Advice? Click here: Follow me on Twitter: Like my Facebook page: h ...

Millennials push fast food industry to customize their meals
Millennials, it seems, want their food quick and customized and they are finding it with a new breed of restaurant called 'Fast Casual'. Today, ...

GTools+ customizes Google+ to your liking
A new Chrome Extension called GTools+ allows you to customize Google+ to your liking. The extension features many customizations like moving ...

iOS 8 How-to: Customize and disable the contacts section in the multitasking interface
... thumbnail For more information about Apps , iOS 8 , and How-To continue reading at 9to5Mac . What do you think? Discuss "iOS 8 How-to: Customize ...

Customize Windows 10's Start menu with these third-party apps
Microsoft’s operating systems have always been easy to customize, and Windows 10 is no exception. We’ve already shown you how to make changes ...

How Emory Porsche Customizes Incredible Vintage Porsche 356s
Some view these new/old hybrids as heresy, but once you get behind the wheel of a souped-up piece of history, it's hard to argue with Rod Emory's ...

Resources last updated: 12/21/2015 11:35:34 AM