Can I set some Web.config values from variable defined on another .config file?

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Can I set some Web.config values from variable defined on another .config file?



Let saying I'm settings a connection string for my Web.Release.config:


Web.Release.config


<connectionStrings xdt:Transform="Replace">
<add name="ProjectEntities" connectionString="Data Source=url;Initial Catalog=catalog;User Id=userid;Password=password;" />
</connectionStrings>



Is there a way to use (for this case) url, catalog, user and password as variables defined on another .config file?


url


catalog


user


password



Such as creating Web.CustomPasswords.config and store the variables (names as before):


Web.CustomPasswords.config


<appSettings>
<add key="url" value="http://mydb.server.net" />
<add key="catalog" value="MyDbName" />
<add key="userid" value="markzzz" />
<add key="password" value="12345" />
</appSettings>









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

UYz8N Jzbwuf98YjzMyWKlpjfhgC,ILqnbFkH,Tmj,wvAJ85NOLNEd,imZYZgy
SB 0,o,9WP,Lf IBxQm9,ta9xzeQiNhqY

Popular posts from this blog

Makefile test if variable is not empty

Visual Studio Code: How to configure includePath for better IntelliSense results

Will Oldham