I have a value stored in my web.config file that I would like to change when the site is published. I want to change it from TEST to LIVE.
<appSettings>
<add key="RequestMode" value="TEST" />
// other keys here
</appSettings>
Is this possible using web.config transformation syntax? If so, how?
Thanks.
Yes this is possible with transformation syntax. This transformation should do the trick:
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<appSettings>
<add key="RequestMode" value="LIVE" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
</appSettings>
</configuration>