This article is a mirror article of machine translation, please click here to jump to the original article.

View: 16528|Reply: 0

[ASP.NET] asp.net mvc Web.Release.config uses detailed explanations

[Copy link]
Posted on 10/15/2018 10:01:41 AM | | | |
In the process of development, after the local development and debugging is completed, we need to publish to the official server, and we often need to modify some configuration files in web.config.

Programmers are lazy, when releasing the official version of Release, can the compiler automatically replace the configuration file with the configuration in the official environment?

Web.Release.config is what it does, and we have been ignoring this file...



Development environment:



Formal Environment:



We release the application package as shown below:



Web.config output file result:



We found that the website was kept, the titile node had been removed, the databaseString property value had been replaced, and the port node had been added.

Transform property

(1) Replace
Indicates that all matching nodes are replacements



In fact, the file is described here when web.release.config, and when the file to be replaced is Web.config .

(2) Remove
Delete the element that matches the first one.



(3) RemoveAll
Delete all matching elements



(4)Insert
Insert from parent node, (insert in authorization<deny users="*" />)



(5)SetAttributes
Set the Attributes directly



(6) RemoveAttributes
Delete the Attributes



(7) InsertAfter (XPath)
By matching the expression of XPath, find the node and insert the XML after the child node



(8)InsertBefore (XPath)
By matching the XPath's expression, find the node and insert the XML in front of the child node



(9)XSLT (filePath)
You can define an XSLT file externally to replace the Web.cofig file.








Previous:Ask for help
Next:Introduction to BonusCloud router mining
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com