Web.config transformations summary

Posted on: Tue Oct 04 14:51:52 -0700 2011. Updated on: Tue Oct 04 14:56:30 -0700 2011.
Category: .NET C#

Here is a summary of the useful web.config transformations to use.

Replace - Completely replaces the first matching element along with all of its children from the destination web.config (e.g. staging environment’s web.config file). Do note that transforms do not modify your source web.config file.

    
        
    

Remove - Removes the first matching element along with all of its children


· RemoveAll - Removes all the matching elements from the destination’s web.config (e.g. staging environment’s web.config file).


    

· Insert - Inserts the element defined in web.staging.config at the bottom of the list of all the siblings in the destination web.config (e.g. staging environment’s web.config file).


     

· SetAttributes - Takes the value of the specified attributes from the web.staging.config and sets the attributes of the matching element in the destination web.config. This Transform takes a comma separated list of attributes which need to be set. If no attributes are given to SetAttributes transform then it assumes that you would like to Set all the attributes present on the corresponding node in web.staging.config




· RemoveAttributes - Removes the specified attributes from the destination web.config (i.e. staging environment’s web.config file). The syntax example shows how multiple attributes can be removed.



InsertAfter (XPath) - Inserts the element defined in the web.staging.config exactly after the element defined by the specified XPath passed to “InsertAfter()” transform. In the syntax example the element will be exactly inserted after the element in the destinationXML.

InsertBefore (XPath) - Inserts the element defined in the web.staging.config exactly before the element defined by the specified XPath passed to “InsertBefore()” transform. In the syntax example the element will be exactly inserted before the element in the destinationXML.

Comments:

Sun Dec 04 22:15:41 -0800 2011
According to my own exploration, billions of people on our planet get the <a href="http://goodfinance-blog.com">loan</a> at different banks. Thus, there is great possibilities to find a college loan in every country.


---------------------------------------------------

Add a Comment:

simple_captcha.jpg
(human authentication)


Ads

Categories

About

Random foliage

This website is meant to be a reference for ASP Dot Net developers. The entries are a compilation of things I've figured out how to do and that I deem useful to keep of track for future reference. Assumptions: web development with: C Sharp (vb sucks), visual studio 05/08, .net 3.5, meant for programmers. Written by: James Reategui.